xaml

Capturing WPF Vector Information BEFORE it Renders to Screen

I'm trying to "capture" or record the vector display information of a WPF (maybe Silverlight) application and play it back. However, instead of capturing bitmaps of what is rendered, I would like to capture the vector information BEFORE it gets rendered so that I can play it back at different resolutions without loss of quality. Ideall...

WPF button template alignment not setting correctly

Hi guys, I have created a button template consisting of a border and a content presenter. A style is then wrapped around this template and applied to a button, when this button is used it is not carrying the values for horizontal and vertical alignment. In the designer the allignments are showing and the button is in the correct place, b...

Wpf template gallery

Hi! Does anybody know of a gallery of controltemplates, that I could use to learn more about what is possible with the different control types? ...

creating a custom user interface in WPF

I have a SQL database holding a number of numeric and text values that get updated regularly. The exact number/type/names of these data points can change depending on the source of the database writes. I would like to create a user interface editor, where the user can add database points to the UI and arrange them and format them as th...

How can I force a ContextMenu to close (WPF project)?

I have a ListBox with items, and have assigned a ContextMenu to it with three menu items. Everything is working fine except that one of the menu items launches a lengthy operation. I would like to close the ContextMenu from the handler, and maybe display an hour-glass cursor or something. Can that be done? Or, should I be using a Popup ...

Tools\addin's for formating or cleaning up xaml?

I'm guessing these don't exist since I searched around for these but I'm looking for a few tools: 1) A tool that cleans up my xaml so that the properties of elements are consistent through a file. I think enforcing that consistence would make the xaml easier to read. Maybe there could be a hierarchy of what comes first but if not alpha...

Binding to RadioButtons IsChecked gets cleared after uncheking.

I have a radioButton group and each Button is binded to an Enum property <RadioButton Name="rbFixedDiscount" IsChecked="{Binding Path=DiscountType, Mode=TwoWay, Converter={StaticResource EnumConverter},ConverterParameter=Fixed, UpdateSourceTrigger=PropertyChanged}" >Fixed:</RadioButton> <RadioButton Name="rbPercentDiscount" Grid.Row="1...

How do I extend a WPF application using an addin-like architeture?

Lets say I have a WPF application that shows a ListBox with an ArrayList -populated with objects of arbitrary types- as a source, and this application is hosted in an assembly 'A'. By default the ListBox will display the custom object 'ToString' method return value. If a data template for that object type is found, the ListBox will use ...

WPF - ListView within listView Scrollbar problem

So I currently have a ListView "List A" who's items each have an expander control which contains another ListView "List B". The problem I am having is that sometimes List B grows so big that it extends beyond the range of List A's view area. List A's scroll bars do not pick up the fact that parts of List B are not being displayed. Is the...

Convert XAML to FlowDocument to display in RichTextBox in WPF

I have some HTML, which i am converting to XAML using the library provided by Microsoft string t = HtmlToXamlConverter.ConvertHtmlToXaml(mail.HtmlDataString,true); now, from http://stackoverflow.com/questions/1449121/how-to-insert-xaml-into-richtextbox i am using the following: private static FlowDocument SetRTF(string xamlString) ...

Making a moveable control in WPF

Hi guys, I have a panel, within that panel are several rectangular controls (the number of controls vaires) I want the user to be able to move the controls around within the panel so that they can arrange the controls in the way that suits them best. does anyone have any resources i could read or simple tips which would get me headed do...

Wpf Resource: "Unknown Build Error, 'Path cannot be null..."

The following is a snippet from a xaml defining a DataGrid in a Control, defining a template selector. <DataGrid.Resources> <selector:CurrencyColorSelector x:Key="currencyColorSelector"> <selector:CurrencyColorSelector.NegativeTemplate> <DataTemplate> <TextBlock Text="{Binding Balance, StringForma...

How does one bind to a List<DataRow> collection in WPF XAML?

Using a DataView one can specify the binding for controls in XAML for example as follows: <Image Source="{Binding Thumbnail}" /> I have a control that displays a number of images. I can get this to work with a DataView as the data source for the control, but I want to use a List collection of DataRow objects, which is not not working ...

ComboBox values disappears after selected when objects used for display

I have a combobox where I want to display objects and have enum values returned. When first opened the combobox displays the items as supposed, but after a value is chosen it seems to disappear from the list. But if the combobox is active I can use the keyboard to navigate up and down between the other values, so they are in the list but...

Display a line after a TextBlock in Silverlight

Hi, I'm working on a dataform in Silverlight 4 and would like to group elements by section, with a title for each. The title consists of a TextBlock followed by a horizontal line. The line runs until the edge of the form. I've tried the following (from this thread: http://forums.silverlight.net/forums/p/77813/183885.aspx), without succ...

How do I create Dependency Objects that inherit the parent's data context?

Normally wpf objects inherits their parent's data context, so if you set a binding and theres no data context set, the binding engine it will automatically look for it in the parents. How can I make a custom class(that is not an UI element) to produce the same behavior when set as the child of another element? ...

How to center text around point using xaml

I would like to be able to place the word "hello" centered on a specific point. I need to do this completely in XAML without extra code. Best I can tell, all the text alignment properties/styles in XAML act on text within some bounding canvas or other element. Since I don't know the length of the text I want to center, I can't cente...

Is it possible to template a template in WPF XAML?

Is it possible to use templates within templates? For instance, I have the following two templates: <HierarchicalDataTemplate x:Key="RecursiveTemplate" ItemsSource="{Binding Children}"> <StackPanel Margin="1" Orientation="Horizontal"> <Ellipse Fill="DarkGreen" Width="14" Height="14"/> <TextBlock ...

User control or custom control for this design?

If I want to create a button control like that, is it supposed to be a User Control or a Custom Control? I am not sure maybe something else? Ideally I want to be able style/animate the main button and the inner button separately; also obviously Ill need to process their events separately. These buttons will be created at run-time and ...

How do I update ItemTemplate after scrambling ObservableCollection(Of ObservableCollection(Of object))

I am learning vb.net, wpf and xaml with the help of sites like this one. The project I am currently working on is a 4 x 4 slide puzzle. I cannot get the buttons in the grid to scramble to start a new game when calling a new game event. Any help will be greatly appreciated. If no answer is can be provide, a good resource to research woul...