Advanced Forum Search Results
-
you can get the binded data item by using the the DataContext of that button.
private void Button_Click(object sender, RoutedEventArgs e)
{
myObject obj=((Button)sender).DataContext;
//Then do whatever you want by the binding data item
}
-
Try to set the SelectedIndex on page loaded event.
void Window1_Loaded(object sender, RoutedEventArgs e)
{
myComboBox.SelectedIndex=0;
}
-
Thanks Mog.
This really helps me a lot.
-
On the selection change event of the tabControl you can check the condition.
private void tabControl_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
if ...
-
you can make a border and set the corner radius of the border.
Inside it make the canvas and set the back ground to transparent. Like this:
<Border CornerRadius="2" BorderBrush="Black" BorderThickness="1">
...
-
To set the tool tip property at run time you can use
myControl.SetValue(ToolTipService.ToolTipProperty, "Hello");
This will set the toolTip of myControl to "Hello".
-
Could you tell me from where you are calling class.cs' function to enable the Book button.
I think you already have an instance of First and then you are creating a new instance of First in class.cs and there you are enabling the button, not on the already existing instance of First. So, you actually enable the button of First ...
-
I have done this and its working for me.
In my App.xaml
<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" ...
-
I want to do same thing and i had written code like this
public Page()
{
InitializeComponent();
this.Loaded += new ...
-
[quote user="uidev"]TabItem tabItem = new TabItem();tabItem.Header = "New tab";tabControl.Items.Add(tabItem); [/quote]
This looks fine. Make sure that height and width of UIElement containing tabControl is not Auto.
Or define height and width of the tabControl.