I have a couple of TextBlocks, bound to different things. Both TextBlocks have the same style applied. In the style there is an eventtrigger which flashes the text when the bound value updates. All works great however when the value for one textblock updates, both textblocks flash. I was expecting just one TextBlock to flash. Any ideas?
...
I am developing a small desktop application in VB.NET. It has to be formal like a business application. Will I need to use WPF?
As I heard it's good for building a richer UI, and I would love to work with something new. But I also have the notion that it's mostly used for graphics rich applications - videos, animations, etc. I do not k...
I've been trying for hours to get to the point where I can start a WPF application and have full control. I want to be able to create a ViewModel, create a View (Window), set the data context of the View to be the ViewModel, then show the View.
I've tried lots of methods, the most promising being to change the App.xaml to be a page and ...
Hi,
I'm using a listbox with a template like the following.
<ListBox.ItemTemplate>
<DataTemplate>
<Image Source="{Binding}" Width="100" />
</DataTemplate>
</ListBox.ItemTemplate>
I bind this to an observable collection conataining 130 paths to images (all do exist, read out using System.IO.Directory) but only a few ge...
I have a listbox with an ItemTemplate that displays a line of text in a TextBlock and a StackPanel containing some ToggleButtons.
If the user clicks on the TextBlock and then uses Up and Down arrow keys, the listbox behaves as it should. When the user clicks on the button and then presses Up and Down arrow keys, it is the button and no...
In Silverlight 4 application there are few images, both are displayed correctly in design mode, one is displayed correctly in run-time also:
<Image Height="180" Width="149" Source="../Picts/Field.png" />
Another one is not displayed in run-time:
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="5" Visibility="...
In the book Visual C# 2010 Recipes: A Problem-Solution Approach, there is an example demonstrating the power of Dependency Properties. The example describes a UserControl that has two properties TextFontWeight and TextContent that have the dependency properties TextFontWeightProperty and TextContentProperty attached to them respectively....
I have the following XAML:
<ComboBox Height="23" HorizontalAlignment="Left" Grid.Row="6" Grid.Column="2"
Name="cbo_team" VerticalAlignment="Top" Width="148"
DataContext="{Binding ElementName=cbo_component, Path=SelectedItem}"
SelectedIndex="0">
<ComboBox.ItemsSource>
<Binding XPath="Teams/Team/@...
Hi,
I have an application with one window. I'd like that window to be replicated/mirrored across two external monitors. (However, either of the monitors should be able to be interacted with, just simple button presses.)
(I could just create two windows and manually make all the same calls, but I'm wondering if there's a way to just 'mi...
If all I'm trying to do is display the contents of some web page in a WPF app, what are the pro's and cons of using the WebBrowser control versus the Frame control? As I understand it Frame wraps WebBrowser anyway.
I have no need to display WPF in my control so that feature of Frame doesn't concern me.
Thanks in advance.
...
Hi,
I saw in Silverlight 4.0 Business application that is it possible to have all the strings in one resource file that you could , potentially, change depending of the user so that each user has its own experience (ie langauge for example)
I'de like to be able to do this in WPF also, so I though about moving that stuff from Silverlig...
Why should we use those, rather than ordinary ones?
what's the benefits of using this:
new Uri("pack://application:,,,/File.xaml");
over that:
new Uri("/File.xaml", UriKind.Relative);
...
I'm dealing with a rather frustrating bug. My ultimate goal is to have an image, which glows on IsMouseOver, and can be clicked to call an event. This seems all too complicated, but the other alternative I found was creating a custom user control, which is even more excessive. This is what I've done so far:
<Style x:Key="DelButton" Targ...
I am new to using styles, resources and templates in WPF. What I need to do is override the ToggleButton +/- in the TreeView to be an image, with a different image for each TreeViewItem root Node. For Instance, I would want an image of a car for the "Car" node, and an image of an airplane for the "Plane" node. I have a colorful and a ...
I'm trying to open the sample Solution for the Microsoft Ribbon for WPF, but I get this error about being unable to load metadata. The solution on that site, and the one linked in the error, is How to: Use an Assembly from the Web in Visual Studio. However, I don't see any 'Unblock' option when I check the Properties dialog for RibbonC...
I have a UserControl with some custom dependency properties bound to a clr property in the ViewModel. The ViewModel has application logic where I deal with the TextPointer/TextRange classes with a FlowDocument.
Should I put that stuff into the code-behind of the UserControl or in the ViewModel?
ranges.Clear();
TextRange ran...
Hi All,
I have a ClickOnce app that I would like to have MAF (System.AddIn) support with.
I have learned about the System.AddIn Pipeline structure and such in a local context, but when it comes to ClickOnce, I can't find any information regarding such a feat.
Do I need to maintain the AddIn pipeline still in a ClicKOnce environment? ...
I am trying to build a grid of items, all dynamically (rows and columns) generated. I have a listview and gridview. I get all of the columns, and add them to the gridview. I then add all my rows to a table, and bind that to the listview.
I am using something similar to rotate the header names on the top of the view.
...
I'm trying to bind a list box in the simplest manner possible with the goal of understanding binding a little better. All examples I see online show data template, and I don't want to get that complicated yet. I have a collection of objects. These objects have a property of string type, and that's what I want to show in the list box. ...
I have a list of Hyperlinks in an ItemsControl and I would like the user to be able to press the spacebar to invoke the hyperlink's command when the hyperlink has focus (currently pressing enter does this as well - but its not so discoverable IMO). Here's my ItemsControl decl:
<ItemsControl x:Uid="_commandsItemsControl" Name="_comm...