Since XAML gets compiled, there should be no difference in execution of code like this.
Winforms (code like):
Form formPeter = new Form();
Textbox textbox = new Textbox();
Label l1 = new Label1();
Xaml does not get parsed at runtime, as I thought... :-)
But what about rendering/execution of big forms with lot of controls?
Which tech...
Hello,
I am working on a graph in WPF, in each section there are thousands of points to draw. The performance for rendering this graph is horrible.
Does anyone have any experience with a filter that will represent the graph with much fewer points - similar to the way a stock graph draws itself when its zoomed out.
Thank you.
...
What's the easiest way to figure out if a window is opened modally or not?
CLARIFIACTION:
I open a window calling
myWindow.ShowDialog();
I have a footer with an "OK" & "Cancel" button that I only want to show if the window is opened modally. Now I realize I can set a property by doing this:
myWindow.IsModal = true;
myWindow.ShowDia...
I have a ListBox which is populated from a collection of ViewModels, which uses in place editing, which I do by having a couple of styles which I can apply to parts of the DataTemplate which make them visible/collapsed as required. These look something like:
<Style
x:Key="UnselectedVisibleStyle"
TargetType="{x:Type FrameworkElem...
I currently have a collection with a HasChanges property on it (each object in the collection also has its own HasChanges property) and the collection is the source of my CollectionViewSource.
When I try to databind the HasChanges property of the collection behind the CollectionViewSource to one of my custom controls, it binds to the Ha...
I'm using Linq To Sql to fill up a listbox with Segment objects, where Segment is designer created/ORM generated class.
<Window x:Class="ICTemplates.Window1"
...
xmlns:local="clr-namespace:ICTemplates"
Title="Window1" Height="300" Width="300">
<Window.Resources>
<DataTemplate x:Key="MyTemplate">
<!-- <DataT...
Please follow the link http://msdn.microsoft.com/hi-in/default.aspx and see the top right corner of the page.
There you will find a "Microsoft.com" expander. When you move the mouse over it, it displays as a popup and grows. When you move your mouse off of it the window shrinks back. I want to mimic this effect in my WPF application us...
I'm really loving the WPF RichTextBox, and all of the out-of-the-box functionality it comes with... but printing is something that I'm having trouble with. I can print (from code) using a PrintDialog and passing in my RichTextBox as a Visual (or by using the "Document")...
But my question is, is there a simple way to use the application...
I have a Button that is looking at 2 comboboxes to make sure they have a value before it is enabled. The problem is the way I am doing it is overwriting the default style declared in my theme project.
<Button x:Name="btnOK" VerticalAlignment="Center" Content="OK" IsDefault="True" Margin="0" Click="btnOK_Click">
<Bu...
Does anyone known (or even has an example) of a WPF based TreeListView that can generate its colums by databinding to the ObservableCollection of its tree items?
For example the databound model is a tree consisting of Employee instances representing the supervisor hierarchy of a company. Each employee addtionally has a ObservableCollec...
I am working on a Custom MarkupExtension within a WPF application. Every documented example I have seen uses string parameters from XAML to construct the new object. Is it possible to use a non-string parameter?
In other words, how can I do something like this?
[MarkupExtensionReturnType(typeof(Uri))]
public class RefPackUriExtension...
Considering you have an MVVM Architecture in WPF like Josh Smith's examples
How would you implement two properties 'synced' that update eachother? I have a Price property, and a PriceVatInclusive property in my model.
-When the Price changes, I want to see the Vat inclusive price to automatically be 'Price * 1.21'.
-Vice versa, when...
I have a ListBox displaying some items, and in certain modes I "stamp" a kind of watermark across the top of it. I've done this with a Border containing a TextBlock with an Opacity of 0.5. All this works nicely.
However, I still want the user to be able to click on the items in the ListBox but if I click on the "stamp" it obviously eats...
Is there any limitations to the WPF Document.Paragraph object when using the FlowDocument control?
I have the FlowDocument turning blank when I add a Paragraph that is more than 450 lines to the Paragraph. I could not locate anything within the MSDN documentation regarding max. lengths etc.
Any ideas why this would happen?
...
This seems to be an absurdly simple question but Google and SO searches yield nothing. How can I disable horizontal scrolling in a WPF listbox when items take up more horizontal space than is available in the box?
...
Tell me it ain't so.
I have a typical windows/file explorer like setup.
Left Side I have a TreeView all data bound showing nodes in a hierachy
Right Side I have a ListView showing Node.Properties
ListView has a IsSynchronizedWithCurrentItem property, which rocks. e.g. If I had another ListView showing a list of nodes and both listVi...
The application I'm trying to localize is a WinForms application that has a few hosted WPF user controls (WPF user controls hosted in an ElementHost WinForms control).
I use resx files to localize the WinForms, which VS2008 manages quite well.
The problem starts when I try to use the LocBaml method to localize the WPF parts.
Here's wh...
I have a screen with a ListBox of items. The item template contains an expander control with some of the data in the header and some of the data in the content part of the expander.
The data template for the ListBox ItemTemplate is similar to this:
<DataTemplate x:Key="MyTypeTemplate" DataType="{x:Type MyType}">
<Expander DataContex...
I would like to create a visual effect when an item in a listbox is double clicked. So far I have drag and drop functionality where the item is visually attached to the mouse and can be moved to a drop target. From that functionality I am able to animate the item using the same logic of getting the item container, however I am not able t...
I've been struggling with the GridSplitter. It seems to be incompatible with the WPF WebBrowser control.
If I resize my window and move the GridSplitter, then I can make my grid wider than my window and non-viewable.
Before:
After: (note scrollbars)
My XAML...
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presenta...