Image source using project resource (WPF)
I added a bunch of images as project resources. Now i want to use them in my WPF application using the image control. How can I assign the resource to the source of the image control? ...
I added a bunch of images as project resources. Now i want to use them in my WPF application using the image control. How can I assign the resource to the source of the image control? ...
How to add a TextBlock to an Ellipse in WPF/Silverlight? ...
I have a button with a Background color, and I want to send this Background color as the Command Parameter to the Command Binding! How can I do that? <Button Background="Red" Command="{Binding ChangeColorCommand}" CommandParameter="{Binding this.Background}" /> ...
Hi. I'm using a WPF Tabcontrol populated with a collection using Itemssource. <TabControl x:Name="_tabControl" ItemsSource="{Binding TabViewModelList}"> <TabControl.ItemContainerStyle> <Style TargetType="TabItem"> <Setter Property="Header" Value="{Binding TabCaption}"/> ...
As soon as i set the readonly property to true,the Transparency of the RichTextBox becomes greyish, so my RichTextBox no longer looks transparent. ...
Hi! I am trying to use XAML completely outside WPF, in particular inside an XNA application. So far, I have managed (quite easily, I am surprised to admit) to load some data inside my XNA application from a XAML file. The problems start when I decided that I wanted to animate one of the properties of my class...Nothing happens :( Here i...
Suppose having this kind of CLR-objects: public class Foo { ... public Bar { get; private set; } } public class Bar: INotifyPropertyChanged { public string Baz { get {...} set {...} } } Now I have a Window, with the DataContext bound to an instance of Foo. Within this Window I do: <TextBox Text={Binding Bar.Baz} /> Bec...
I'm just diving into WPF and find this a little odd and frustrating to my style: Why can the value of something be a Resource but you can't set the value directly to what the Resource represents? Example: This is valid: <ToggleButton> <ToggleButton.Resources> <Image x:Key="cancelImage" Source="cancel.png" /> </ToggleBut...
I've been using the DataGrid (from WPF Toolkit), and have successfully created all of my data. The next step is that I want to print the entire DataGrid (scaled to a single printed page), even though the visible DataGrid in my Window is currently scrolled. When I prepare the DataGrid for printing, I've tried setting the DesiredSize to ...
How to set MouseOver event/trigger for border in XAML? I want the border to turn green when the mouse is over it and then to return to blue when the mouse is no longer over the border. Why can't I just use the following code: <Border Name="ClearButtonBorder" Grid.Column="1" CornerRadius="0,3,3,0" Background="Blue"> ...
I currently use this style for my ComboBox in WPF: <Style TargetType="ComboBox"> <Setter Property="Foreground" Value="White"/> <Setter Property="Background" Value="#303030"/> <Setter Property="BorderBrush" Value="#000000"/> </Style> How can I change it to specify the background color when the ComboBox i...
Hi I need to fetch a flex application from a process in C#. How can i get access to the externalInterfaceAPI when the flex application is running as a Application? EDIT: After further reading it looks like it is possible, as from what i understood, a flex stand alone application is a ActiveX "container", so what i need is to get acces...
I need to build a spreadsheet-like control in WPF with the following features: Frozen columns Frozen rows Cell merge Ability to have arbitrary user controls hosted in a cell with their own data binding targets I do not need any calculation or formatting functionality, so the amazing ClearOffice Excel control is overkill for my needs ...
I've not been able to find a whole lot on this anywhere. Let me start by saying I don't want to use the old Windows Form. I want to add a new WPF Window to my outlook 2007 addin project in visual studio 2008. The WPF Window template however does not show up. I was following this tutorial: http://msdn.microsoft.com/en-us/library/bb41...
I have a WPF, vista style progressbar that I want to change the brushes on. I've set the foreground brush to another color, but there is a sort of whoosh animation effect whose color is still the default green. How can I change this? ...
I have an ObservableCollection of addresses that I am binding to a ListBox. Then in the ItemTemplate I am Binding to the current address record using {Binding .}. This results in my addresses displaying using their ToString method which I have setup to format the address. All is good, except if I update properties on an individual addres...
I've got WPF 4 app that has a number of UserControls that share styles in their child controls. So I'm creating a number of styles in my App.xaml as . For example: <Style x:Key="ViewTitle" TargetType="{x:Type Border}"> <Setter Property="BorderBrush" Value="LightGray" /> <Setter Property="HorizontalAlignment" Value="S...
Given that you're creating a User Control in WPF that will be displayed on different screen resolutions, what's the best way to layout a dense collection of "input form" elements? For example, labels, textboxes for text, dropdowns, group boxes, etc. Do you create a master "grid" and use StackPanels and WrapPanels like crazy? What's the...
I'm trying to add a Viewport2DVisual3D to a Viewport3D in code, but the visual isn't showing up. Any help understanding why not would be appreciated. The following is the code for the main window. Is it sufficient to just add the Viewport2DVisual3D to the children of the Viewport3D in order for it to be rendered? public partial cla...
My application has a tray icon which, when double-clicked, hides or shows the application window. My issue is that I can't seem to bring the window to the foreground if it was in a minimized state when it was hidden. For instance, say the user minimizes the application and then double-clicks the tray icon. The application window is then...