I have a DependencyObject in C# that is used in an array. Example shown below:
private KeywordTag[] tags = new KeywordTag[] {
new KeywordTag { Tag = "test", IncidenceCount = 2076 },
new KeywordTag { Tag = "oi", IncidenceCount = 2052 },
new KeywordTag { Tag = "hmm", IncidenceCount = 1887 },
new KeywordTag { Tag = "grr", ...
Can I stream a live video in WPF application from my web cam? If yes, then How?
...
I am trying to do something very simple. I have a ToggleButton.IsChecked property bound to a bool. I want the background to toggle between red(false) and green(true). But for some reason it seems to be toggling between red and no background. I used a converter to check if I am getting proper notifications from the source and I am, so not...
What is a common real life use for Dispatcher.DisableProcessing in WPF? Can I use it to suspend rendering and layout when I build a complex UI in code?
...
Anyone know of a way to reliably take a snapshot of a WPF window? The PrintWindow api works well for "standard" win32 windows but since WPF uses DirectX, PrintWindow fails to capture an image. I think that one would need to grab the front buffer for the DirectX object associated with the window, but I am not sure how to do that.
Thanks!...
How is it possible to programmatically select an item in a WPF TreeView? The ItemsControl model seems to prevent it.
...
Hello,
I've been trying to see if there is an easy/clever way to implement binding to ListBox.SelectedItems. If you have tried yourself, you will know, that markup binding using BindingExtension will not work - the property doesn't support it. So you are left with wiring up a handler for SelectionChanged and trying that route. The close...
I've got two WPF Toolkit DataGrids, I'd like so that when the user resizes the first column in the first grid, it resizes the first column in the second grid. I've tried binding the width of the DataGridColumn in the second grid to the appropriate column in the first grid, but it doesn't work. I'd prefer to use all xaml, but I'm find wit...
I don't know if this is the right way to phrase the question or not. Here is a typically databinding example:
<UserControl x:Name="root">
<ListView ItemsSource="{Binding MyItemsSource, ElementName=root}" />
</UserControl>
But this is what I want to be able to do:
<UserControl DataContext="{Binding SelectedItem, ElementName=lstMyI...
How do I allow only one instance of a WPF application to run?
Thanks.
...
I would like to pass a reference of a method into another method and store it as a variable. Later, I would like to use this reference to define an event handler.
When making an event handler, a method reference is passed like:
myButton.Click += new RoutedEventHandler(myButton_Click);
And if you look at the constructor for "RoutedEv...
We are looking to implement Optimistic locking in our WCF/WPF application. So far the best way I've come up with doing this is to implement a generic Optimistic which will store a copy of the original and any changes (so it will store two copies: the original and modified) of any value object that can be modified. Is this the best way of...
I have a string for a WPF Paragraph that I would like to replace certain words with InlineUIContainers. Would would be the best method to do this?
As I am comparing words, would it be best to split the string of the Paragraph text into and ArrayList of words and then compare each word and replace the ArrayList object with the InlineUIC...
I have this legacy database for which I'm building a custom viewer using Linq to Sql.
Now some of the fields in a table can have the value NULL.
Using normal databinding in a DataTemplate (typed for the Class generated by the ORM Designer)
<TextBlock Text="{Binding Path=columnX}"/>
If columnX has value NULL, nothing is displayed. (It...
Hi all,
I have a class that inherits from ObservableCollection(Of MyObject) and the MyObject class handles INotifyPropertyChanged as it should. When the user updates this data through bound controls the collection will change as expected.
I have a 'Save' button on the form which is meant to persist this collection to disk as XML by cal...
Looking for a general purpose WPF toolset. Currently looking at Telerik and Infragistics. Are there better options out there? Of those two, which is better?
...
Intention: To display the busy/Wait cursor for the duration that the children of the node are populated.
Seems to be hidden in WPF. I remember having some kind of event in Winforms Tree Control where you could subscribe to - to achieve this.
Currently I have a TreeView which has a number of listviews tied to its SelectedItem. All contr...
In our application, we allow administrators of an install to design templates for name tags that are printed when they check-in from a kiosk (sort of like checking in for a flight at a kiosk and printing out a boarding pass).
For example, the template might look something like this:
[FirstName] [LastName]
[Company]
[PersonImage]
[BarCo...
I have a user control that exposes a property of type ImageSource. I want to expose this property in Blend so that I can edit it in Blend, rather than specifying the image in code.
Based on what I've Googled, I've added a dependency property, and specified appropriate attributes to expose the property in Blend.
I can see it there, and...
I have a WPF Combobox that is binding to
Me.fontComboFast.ItemsSource = Fonts.SystemFontFamilies
<ComboBox x:Name="fontComboFast">
<ComboBox.ItemsPanel>
<ItemsPanelTemplate>
<VirtualizingStackPanel />
</ItemsPanelTemplate>
</ComboBox.ItemsPanel>
<ComboBox.ItemTemplate>
<DataTemplate>
...