I am loading some XAML pages that I have created that have some data binding in them. However, when I load these XAML files at runtime their data binding no longer works. I'm wondering if it's some kind of scope or pathing issue or if you just can't do it.
Here is how I am loading the XAML
using (XmlReader rdr = XmlReader.Create(@".\Tw...
Hi,
I have a UserControl, in the Resources section I have code like
<Style TargetType="{x:Type Viewbox}">
<Style.Triggers>
<Trigger Property="Viewbox.IsMouseOver" Value="True">
<Setter Property="Viewbox.Effect" >
<Setter.Value>
<DropShadowEffect Color=...
Hello!
So, I got a 10 element array and I want to display those elements in a 10 textboxes that are in different xaml file and are created as a child of stack panel. How do I do it?
Thanks in advance.
...
I want to enable / disable a DataGridTextColumn based on whether or not the SelectedValue of its neighboring DataGridComboBoxColumn == 'Other'
I can make this work in a ListBox as below, but this won't work in my DataGrid environment as the DataGridComboBox column doesn't have a name property.
<ListBox Grid.Row="1" Grid.Column="1" Item...
I'm creating a Key/Value pair editor and would like for the value to have a custom template based on the data type.
<TextBox x:Uid="txtKey" x:Name="txtKey" Grid.Column="1" Grid.Row="0" Text="{Binding ElementName=This, Path=KeyValuePair.Key}" VerticalAlignment="Top"/>
<ContentControl Grid.Column="1" Grid.Row="1"
x:Uid="Conten...
I have designed a multithreaded app, which is starting most windows in an dedicated thread like this:
Thread newWindowThread = new Thread(new ThreadStart(ThreadStartingPoint));
newWindowThread.SetApartmentState(ApartmentState.STA);
newWindowThread.IsBackground = true;
newWindowThread.Start();
However, if in one of those window-in-own-...
I have a TextBlock that I need to allow to expand onto two lines, but no more. Can I express this declaratively in xaml?
...
I have a wpf app that shows 5 different usercontrols as you go through the system. Each usercontrol has a listbox on it. So i want to select an item and pass it back to MainViewModel. I have it working now so that i can store a value in ViewModelBase but it seems that my tactic for calling the User controls is flawed as I cant link up to...
Does anyone know if it is possible to trigger an animation when a WPF ContextMenu closes?
I have code that triggers an animation when the ContextMenu is opened. The animation makes the context menu fade into view. I also want an animation when the ContextMenu is closed that makes it fade out.
The code that starts the opened fade-in a...
i am working on multiscreen project, i have successfully able to display the Window on the 2nd monitor,Now i want to display the same window on the both monitors and these windows should be synced with one another with respect to data, events and bindings.
but they can work independently,e.g i have window and it is loading manay user con...
I'm a WCF newbie, and I wonder, is it possible to declare in XAML that all my TextBoxes should have a height of 26, for example? That is, not to set the height of each item individually?
...
hi all,i have
<StackPanel Orientation="Horizontal">
<StackPanel Orientation="Vertical">
<StackPanel>
<Label Name="CompanyName" FontWeight="Bold" Content="{Binding CompanyName}"></Label>
...
How can it be done with c#?
I'm able to populate a listbox on a button click, but don't know how it can be done on application startup.
Thanks.
...
I know this question has been asked before, but in view of .NET 4.0 and the improvements that have gone into making WPF more performant, does the community think that performance is no longer a criteria for choosing one technology over another.
...
I have a 3D scene where my 3D models are being loaded in the code behind from XAML files.
Each model is comprised of a tree of nested Model3DGroups each of which has various transformations applied to it to position and orient the next subcomponent of the model in the tree. This model is then used as the content of a ModelVisual3D so t...
Hi
PrintCapabilities printCapabilites = SelectedPrinter.GetPrintCapabilities();
IEnumerable<PageMediaSize> pagesizeList = printCapabilites.PageMediaSizeCapability;
The above code does not list all the page sizes that the printer driver supports and this is my problem.
As an example if you use the Microsoft XPS printer driver you will...
I have a wpf Window, which has wpf control and windows forms control hosted in WindowsFormsHost.
The expected behavior is that the WPF control should be rendered on top of WindowsFormsHost.
Unfortunately, this is a limitation in the interop story, WindowsFormsHost elements are always drawn on top, and don't get affected by z-order.
http...
I've got a series of buttons labelled for the 24 hour clock. For example;
<StackPanel Orientation="Horizontal">
<ToggleButton Content="00:00" Name="thetime0000"/>
<ToggleButton Content="01:00" Name="thetime0100" />
<ToggleButton Content="02:00" Name="thetime0200" />
<ToggleButton Content="03:00" Name="thetime0300" />...
Hi,
I have created a somewhat complex shape using basic shapes. I would like to use multiples of this on a canvas, created programmatically in code behind.
I have thought about creating a UserControl, but what's the best way to encapsulate this composite shape?
...
I want to add filter to columns in WPFToolkit datagrid. Is it possible to make it work like the ones in commercial grids (like in DevExpress's or Telerik's..)? Also a small second question about paging in datagrid..Do i need the one in the grid (i just want fast grid, so i thought about paging. Or maybe data virtualization there works ju...