xaml

Adding a Merged Dictionary to a Merged Dictionary

I can't seem to be able to add a merged dictionary to a collection of merged dictionaries within XAML. Theme.xaml <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="/Mine;component/Themes/Palette.Blue.xaml"/> <ResourceDictionary Source="/Mine;component/Themes/Template.xaml"/> </ResourceDictionary.MergedDiction...

Can a WF4 Generic Activity be Declared in XAML?

I have a Workflow 4 activity that can be run on any number of classes that inherit from my base class. So, the activity is, naturally, generic. Similar to the ForEach or AddToCollection activities, my activity requires a type parameter. My question is: can I create this activity in the designer with XAML? Keep in mind this is a composit...

Where can i find the default style for a WPF DataGridRow

Hey Any idea where i could find the default style XAML for the WPF DataGridRow? The goal is to change the color of the row when you hover over it or select it. i dont like the ugly blue :) Thanks! ...

Lookless controls with multiple children in properties/parts (+ theming)

I've created a custom control for MahTweets which simplifies/unifies the look of each update across the various social network updates we support. In theory it also simplifies how to theme everything, because we can just create a style for the lookless control. public class StatusUpdateView : Control { public static readonly Depende...

WPF Error on Non-Development PC - XamlParse

I have an error very similar to the one addressed in this question. I am trying to deploy a small c#/Xaml utility on 6 work machines. 4 of the machines run the utility successfully and 2 do not. All machines are windows XP and have .Net frameworks 1-4 installed (my app is compiled against 4.0 and all machines have both client and extende...

WPF: Resizing a circle, keeping the center point instead of TopLeft?

Hi all, I'd like to resize a circle on my canvas with the help of a slider. This circle can be moved around on the canvas by some drag&drop stuff I did in code behind, so its position is not fixed. I have bound the slider's value to an ellipse's height and width. Unfortunately, when I use the slider, the circle gets resized with its to...

How to fix OPENXAML statement to add INT column?

I am a newbie to OPENXML. But I am trying to load a .XML file into a SQL table that I created for this. I do not receive any errors with this code, but it inserts NULL values in the last column. I know that this ENTITY-ID column is specified as a string in the schema, but I made it an INT in this table because all of the values are numb...

XAML: The property 'Resources' is set more than once.

I'm getting the following error: The property 'Resources' is set more than once. Here is my XAML: <UserControl.Resources> <!--Resource dictionaries for framework stuff--> <ResourceDictionary> <Style x:Key="MultiLineTextBox" TargetType="TextBox"> <Setter Property="BorderThickness" Value="0"/> ...

The 'clr-namespace' URI refers to a namespace that is not included in the assembly.

Hello all. I'm trying to include in my XAML some classes which convert values. However, I'm getting the following error when I compile: Undefined CLR namespace. The 'clr-namespace' URI refers to a namespace 'View.Summary.Converters' that is not included in the assembly.(View\View) And the XAML it's erroring on: xmlns:c="clr-name...

using XAML to bind to a System.Drawing.Image into a System.Windows.Image control

I'm binding a ListView to a list of objects, like so; <ListView ItemsSource="{ Binding Path=. }" ItemTemplate="{DynamicResource EventTemplate}"> I'm binding to an object which declares two properties; string DisplayName { get; } System.Drawing.Image Image { get; set; } I want to populate a DataTemplate but I can't figur...

WPF: Proper configuration for Window with a child UserControl (MVVM)

I am trying to properly accomplish the following. I have a UserControl (ProgramView). It has a viewmodel (ProgramViewViewModel). ProgramView is consumed as a child control within a Window (ProgramWindow). ProgramWindow has a public property ProgramId, so the consumer of the window can specify the desired Program (data entity) to show. Pr...

Setting Binding Properties in a Template

Is there a way to template Binding.Converter and Binding.ValidationRules within a style? Eg: I have the following textbox: <TextBox x:Name="DepartTime" Height="23" HorizontalContentAlignment="Left" HorizontalAlignment="Left" Margin="3" Width="140" Style="{DynamicResource TimeOfDayTextBox}">...

Is there a generic way to set the DataContext of the ItemContainer underneath the mouse to a property of some other control?

When hovering over an item in a list, how can I set a property on another element to the DataContext of the list item? I'm trying to make an area where I can display a preview of the item currently underneath the mouse cursor. I'm able to do this using code-behind, but I'd like to find an alternative way which could use EventSetters/Bin...

Button growing 8 pixels when MouseOver WPF XAML

I'm dealing with a rather frustrating bug. My ultimate goal is to have an image, which glows on IsMouseOver, and can be clicked to call an event. This seems all too complicated, but the other alternative I found was creating a custom user control, which is even more excessive. This is what I've done so far: <Style x:Key="DelButton" Targ...

What format is needed to add multiple column groupbox's to a page?

I am using a grid layout and adding groupbox's, but can only add a single column wide. What do I need to use that will allow me to add multiple groupbox's to a single line on the page? ...

How to move Radio buttons click events in Behind code to XAML

Hi all: C# vs2010 XAML How can I move the code behind to the xaml window code? and also like to bind them to a property defined in a persistent class as Public class MyClass { public Myenum RadioBtns {get; set;} Thanks I have 4 radio buttons on a XAML window ...

Why does XamlReader throw when I use a ParserContext?

This works: XamlReader.Parse("<Pig xmlns=\"clr-namespace:Farm;assembly=Farm\"/>"); This throws The tag 'Pig' does not exist in XML namespace 'clr-namespace:Farm;assembly=Farm': var context = new ParserContext(); context.XmlnsDictionary.Add("", "clr-namespace:Farm;assembly=Farm"); XamlReader.Parse("<Pig/>", context); Why? Farm is t...

WPF ComboBox SelectedItem Set to Null on TabControl Switch

Hello everyone - I've got a simple problem in my WPF application which has me banging my head on the table. I have a TabControl, where every TabItem is a View generated for a ViewModel using a DataTemplate similar to this: <DataTemplate DataType="{x:Type vm:FooViewModel}"> <vw:FooView/> </DataTemplate> FooView contains a ComboBox:...

Horizontal Rule in Silverlight/XAML

Hi all, I'm looking for a way to draw a horizontal rule across my Silverlight App. I'd like to be able to insert it in the XAML rather than the C#. Can't seem to find much via Google or MSDN. Thanks! ...

Does FluidMoveBehavior work with ContentPresenter or am I running into a known limitation in Silverlight 4?

I have created a custom ToggleButton where the content is a TextBlock (not just a string) pasted in manually into the right place in XAML. The parent layout in the ToggleButton is a Grid with 2 columns, where the toggling swaps the ContentPresenter and some graphics between the columns. The graphics animate perfectly when FluidMoveBehav...