In an event handler for a Command for a DataGrid, I get DataGridCell in ExecutedRoutedEventArgs. However, I couldn't figure out how to get its associated DataGrid and DataGridRow. Your help is much appreciated.
...
hello,
I have got a collection of viewModels(InputViewModel) in an other viewModel(ScenarioManager).
each InputviewModel has an instance of a Class(RestOfInput) which contains properties able to raise the OnPropertyChanged.
when one of these properties changes the event is handled by this method (in InputViewModel) :
public void...
I have MainWindow with a statusbar and multiple user controls in it. Each user control has a viewmodel. How do I bind/update the statusbar text from multiple viewmodels?
...
I have a normal Button and TextBox in a WPF-Window and I want a Template for the Button with a EventTrigger that listens to Button.Click and then sets a boolean-property of the TextBox. No code-behind.
Something like this:
<ControlTemplate.Triggers>
<EventTrigger SourceName="MyButton" RoutedEvent="Button.Click">
<Setter TargetNam...
Can we cast a WPF User Control to a form control??
...
Hi All
I have the following code, which runs a WPF window on it's own dedicated UI thread:
// Create the dedicated UI thread for AddEditPair window
Thread addEditPairThread = new Thread(() =>
{
// Initialise the add edit pair window
addEditPair = new AddEditPair(this);
addEditPair.PairRecordAdded += new EventHandler<PairRec...
Hello,
our company wants a TextBox very similar to outlook recipient Textbox.
Not emails but displaying people`s names delimited with a e.g. semicolon and
even more crazy ideas on it...
Do you know of any commercial WPF control who can handle that job? I already checked DX,Telerik,Infrapistics,Farpoint,componentone,Nevron,Syncfusion, e...
I use Some Label For menus (Like websites vertical Tab Menu) if a label is clicked then the Hover effect of the labl wont take effect.., But i cant able to do that., For Hover I am Using StoryBoard
...
I would like to display a WPF window from a windows forms application (.NET 3.5).
This code seems to work without any problem in a sample project:
public partial class WinFormsForm1 : Form
{
public WinFormsForm1() {
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e) {
WpfWindow1 w =...
I have next code:
<ListBox Grid.Column="1" Grid.Row="4" Grid.RowSpan="2" Margin="0,0,1,0" MinHeight="80" Name="lbThemes" SelectionMode="Multiple" IsEnabled="True">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel>
<CheckBox x:Name="ThemeCheckbox" />
<TextBlock Text="{Binding Path=labe...
hey all
i want to change in my style resources on the runtime
does any body have an idea how can i deal with that from the c# code file?????
thnx
...
In my WPF application, I host Win32 content using HwndHost. However, creating a HwndHost does not create the native window. Rather, this is done in the overridden BuildWindowCore() method which is called sometime later by WPF.
My hosted content needs the window handle of the native window for its own initialization. Unfortunately, there...
Hi.
I am trying to add a button to a custom ListView (MyListView) which triggers a command (MyCustomCommand) defined in MyListView. I have added the button (and a title text) by applying a ControlTemplate. The problem is that I have not found a way to trigger MyCustomCommand when clicking the button. What I eventually want to achieve is ...
Hi there, I'm implementing a WPF application where one can drag & drop a element in a designated area where this element is restored to its initial position. The drag & drop is working, and already have the events for the dragging and drop actions; my problem is how to restore the visual element to the correct position, previously stored...
Hello
I have a memorey card game where my binding is to
public ObservableCollection<List<memoryCard>> MyCollection { get; set; }//holding the array
where is initlized like this :
for (int i = 0; i < Size; i++)
{
List<memoryCard> list = new List<memoryCard>();
for (int j = 0; j < Size; j++)
...
Assume I have SomeExtension markup extension. Does anyone know how to assign it to a property from C# code?
That is for example in xaml I have
<TextBlock Text="{l:Translate LocalizedByMarkupExtension}" />
I want to do the same using C# code.
...
When I have my button's content as a normal string e.g. <Button Content="Ok" /> then button behaves as normal. But if I change the content to have a keyboard accelerator e.g. <Button Content="_Ok" /> the button's style changes to have different margins and sizes.
I have a TextBlock style that doesn't have a key so is being applied to al...
Is there a way to do idle time processing in WPF application equivalent to OnIdle event in MFC?
...
I have two User Controls in my window, both are bound to the same context.
One of them is getting updated and the other is not.
What could be the reason?
...
I get new bitmap from some other component ( dont have any control on the other component ) every 5 seconds and i need to update my wpf image control with the new bitmap ( every 5 seconds ... ).
I cant find any way to update this wpf image control in run-time.
How can i do it ?
Thanks.
...