I want to assign a resource I already have a second name, similar to using the BasedOn property of Styles. Specifically I have a brush that I use for a group of elements called ForegroundColor and I would like to use it in a control template (a ComboBox) calling it MouseOverBackgroundBrush. I would like to do something like this:
<Resou...
I am working on a WPF application which has a treeview that represents an XML. I load the XML on to the XDocument, then bind the TreeView to this object.
Now using the MVVM pattern, I want to provide a ViewModel on top of XDocument. What are some of the things that I should implement in the ViewModel class.
I am thinking of,
Routed...
I have a unique development situation and would like some input from others.
I have a situation where I need to load loose xaml files within a rich client application.
A given loose xaml file may have references to an assembly not currently loaded in memory
so the referenced assembly is loaded before the loading the loose xaml. The loo...
I'm having real difficulties with XAML files in Silverlight since they get very big very fast when using Blend. It just becomes a wall of text after only a handful of controls are added and animated.
I'm hoping a better vesion of Blend will come out soon, so that our designers will never even have to see XAML. For now, though, that is n...
I've been able to find Xaml Object Mapping Specification, WPF Xaml Vocabulary Specification, and Silverlight Xaml Vocabulary Specification documents online but no WF Xaml Vocabulary Specification document for Windows Workflows. I want to be able to specify workflows without using a Visual Studio IDE.
Does anybody know if this specifica...
I've got a Page class in my .edmx ADO.NET Entity Data Model file with with Parent and Children properties. It's for a hierarchy of Pages.
This is handled in my SQL database with a ParentId foreign key in the Page table bound to the Id primary key of that same Page table.
How do I display this hierarchy in a WPF TreeView?
...
I have a really simple WPF UserControl:
<UserControl x:Class="dr.SitecoreCompare.WPF.ConnectionEntry"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Name="connEntry"
BorderBrush="Navy" BorderThickness="1" Margin="5,0,0,5" >
<StackPanel Margin="0,10,0,0" >
...
I can't seem to set a ContentTemplate for a ComboBoxItem. There reason I'm trying to do this is I want to have 2 appearances for my data in the combo box. When the combo box is open (menu is down) I want a text box (with the name of the image) and an image control below it. When I select the item I want the combo box to just show a text ...
I have a bunch of controls on my window. One of them is a refresh button that performs a cumbersome task on a background thread.
When the user clicks the refresh button, I put the cursor in a wait (hourglass) status and disable the whole window -- Me.IsEnabled = False.
I'd like to support cancellation of the refresh action by letting ...
I have a C++ assembly with both managed and umanaged code compiled to
a DLL. It is correctly imported into the project references as I can
see all my classes and their members with the Object Browser.
The problem is with the XAML Design view. In my XAML code I want to
make a data bind with my C++ assembly so I have the namespace like s...
I am trying to do this...
<Image x:Name="imgGroupImage" Source="Images\unlock.png" Margin="0,0,5,0" />
But I get this error...
Cannot convert string 'Images\unlock.png' in attribute 'Source' to object of type 'System.Windows.Media.ImageSource'. Cannot locate resource 'forms/images/unlock.png'. Error at object 'System.Windows.Hierarc...
Let's take a very simple example:
In my window1.xaml, i have a label
control named 'lblProduct'.
In my window1.xaml.cs, i have a
public method called
CalculateProduct(Int Var1, Int
Var2). CalculateProduct will, as
you may have guessed, calculate the
product of the variables passed in.
I'd like to simply bind the results of 'Calculat...
I would like to add some icons to my treeview. Is there a way to do it within the XAML?
<TreeView Height="200" Name="treeView1" Width="120">
<TreeViewItem Header="Topic1" IsExpanded="True">
<TreeViewItem Header="Subtopic2" />
<TreeViewItem Header="Subtopic3" />
</TreeViewItem>
</TreeView>
...
WPF GridSplitter makes my Grid wider than my Window!
I've got a WPF Grid with a GridSplitter. If I resize my columns, then I can make my grid wider than my window and non-viewable.
It starts like this:
But after widening the left column, I can no longer see the right column (green):
What am I doing wrong? How do I keep the ...
Where to upload policies in the Oracle Entitlement Server?
...
I'm fairly new to WPF and I've come across a problem that seems a bit tricky to solve. Basically I want a 4x4 grid thats scalable but keeps a square (or any other arbitrary) aspect ratio. This actually seems quite tricky to do, which surprises me because I would imagine its a reasonably common requirement.
I start with a Grid definiti...
I am creating a Control Template for the Button control in Silverlight 2. I started with an empty template and added the visual elements I wanted. The main visual element is just a path (shape) filled with a color. The button control already has a Color property associated with it and I was wondering if it was possible to link the Col...
How can I draw a concave corner rectangle in WPF?
...
Ok... I'm new to WPF, but I kind of know how to do things using DataTriggers and Converters.
But, what I want to seems a little more complex than that. Let me give you the details:
The DataContext for the ListView control is an IList of objects (object=Room). These are the available rooms. I've got another control (let's say it's a ...
I'm working on a simple application to start learning my way around WPF. I created a vector graphic in Microsoft Expression Design at 400px by 400px, mainly because I thought it would be easier to create it on a bigger canvas.
I've exported the image to a XAML file as a series of objects within a 400px square canvas. All of the child ob...