xaml

Where is the Silverlight Calendar Control?

Just playing around with the now released Silverlight 2.0. I'm trying to put a simple Calendar in a control. However the project doesn't seem to know what I'm talking about:- <UserControl x:Class="MyFirstSL2.Test" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml...

Can't create xmlns reference to other project in XAML

I have a WPF project defined like this: MyApp.sln MyAppWPF MyApp.Domain In one of my xaml files in the MyAppWPF project I'm trying to reference a class defined in MyApp.Domain project. I have a project reference in MyAppWPF to MyApp.Domain. I am trying to create the reference like this: <Window x:Class="MyAppWPF.Window1" ...

Xaml not WPF

I am interested in using Xaml with expression blend for creating user interfaces in an application. However, because of the limitations of the target architecture, I cannot use WPF or C#. So, what I am interested in is in any examples / existing projects or advice from anyone who has experiance of this technology on the use of Xaml in i...

Drag WPF Popup control

hi there, the WPF Popup control is nice, but somewhat limited in my opinion. is there a way to "drag" a popup around when it is opened (like with the DragMove() method of windows)? can this be done without big problems or do i have to write a substitute for the popup class myself? thanks ...

XAML - TextBox Linebreak

Is there anyway in XAML only to have a linebreak in a TextBox? I know I can set myTextBox.Text = "something\r\nsomething2" in Code, but I can't do this: <TextBox x:Name="myTextBox"> <TextBox.Text> Something <Linebreak/> Something2 </TextBox.Text> </TextBox> or this <TextBox x:Name="myTextBox" Text="so...

Splitting WPF interface across multiple Xaml files

I am trying to create a user interface using XAML. However, the file is quickly becoming very large and difficult to work with. What is the best way for splitting it across several files. I would like to be able to set the content of an element such as a ComboBox to an element that is defined in a different xaml file (but in the same VS...

Scrolling Text Block/Area/Div in Loose XAML

Hi Is there any way to display scrollabletext in loose xaml? The equivalent in HTML would be <div style="overflow:scroll">some long bit of text here</div> Can you do this in loose xaml? From my experiments so far it seems that in loose xaml a) you cannot use TextBox it must be TextBlock b) TextBlock doesn't seem to have any stylin...

How to correctly inherit from a usercontrol defined in XAML in Silverlight

If I have a usercontrol (in Silverlight) that I've written, that uses XAML to define it's appearance, how can I make a customised version of it? i.e. I have MyControl.xaml & MyControl.xaml.cs What do I need to do if I want a "SpecialisedControl" child class? I assume I just make a new code file, then inherit from MyControl. But what if...

XPath in C# code behind of WPF

You can use XPath if you're binding the XML document in the XAML, but what if you're loading the XML document dynamically in the code behind? Is there any XPath methods available in the C# code behind? (using .NET 3.5 SP1) ...

WPF throwing an exception parsing XAML that includes a Winforms User Control

I have a WPF app that makes use of a Winforms User Control that I have created using C++/CLI. When my app goes to parse the XAML for my main window, it throws an exception. The information appears to be somewhat abbreviated, but it says: A first chance exception of type 'System.Windows.Markup.XamlParseException' occurred in Presentation...

How to reference current object in xaml

I cant' figure out how to reference the current instance object defined by the xaml file in the xaml file. I have a converter that I want to send in the current instance as the parameter object. {Binding Path=<bindingObject>, Converter={x:Static namespace:Converter.Instance}, ConverterParameter=this} In this code this is converted to...

XAML : Binding textbox maxlength to Class constant

I am attempting to bind a WPF textbox's Maxlength property to a known constant deep within a class. I am using c#. The class has a structure not too dissimilar to the following: namespace Blah { public partial class One { public partial class Two { public string MyBindingValue { get; set; } ...

How do I make the IsEnabled property of a button dependent on the presence of data in other controls? (WPF)

I have a "Login" button that I want to be disabled until 3 text boxes on the same WPF form are populated with text (user, password, server). I have a backing object with a boolean property called IsLoginEnabled which returns True if and only if all 3 controls have data. However, when should I be checking this property? Should it be ...

How to bind Xml Attribute to Treeview nodes, while databinding XDocument to WPF Treeview

I have an XML that needs to be databound to a WPF TreeView. Here the XML can have different structure. The TreeView should be databound generic enough to load any permutation of hierarchy. However an XAttribute on the nodes (called Title) should be databound to the TreeViewItem's header text and not the nodename. XML to be bound: <Wiza...

Is there any way to change the Context Menu of a Web browser using Wpf (C#)

I would to change the menuitems in the default context menu provided in the Web Browser Control. I have already tried: webbrowser.contextmenu = mycontextmenu. Nothing changed. Is there a way to do this? ...

WPF ComboBox binding not working as expected.

I want my WPF ComboBox's ItemsSource property to be bound to MyListObject's MyList property. The problem is that when I update the MyList property in code, the WPF ComboBox is not reflecting the update. I am raising the PropertyChanged event after I perform the update, and I thought WPF was supposed to automatically respond by updating...

Could not load type 'System.Windows.Controls.Primitives.MultiSelector' from assembly PresentationFramework

I'm trying to use the Grid from WPFToolkit, but I'm getting the error: DisplayDataMapping.xaml (9,89): errorMC1000: Unknown build error, 'Could not load type 'System.Windows.Controls.Primitives.MultiSelector' from assembly 'PresentationFramework, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. Line 9 Po...

How do you pass "this" to the constructor for ObjectDataProvider in XAML?

How do you pass "this" to the constructor for ObjectDataProvider in XAML. Lets say my presenter class is: public class ApplicationPresenter(IView view){} and that my UserControl implements IView. What do I pass to the ConstructorParameters in the code below so that the UserControl can create the ApplicationPresenter using the defaul...

MouseOver highlighting style returning to default after a second (Caused by Aero?)

I'd trying to style my ComboBoxes to match the rest of the UI but I'm having problems with the IsMouseOver highlighting. It highlights with the color I specify for a second and then fades back to the default color, kind of a cool effect but not what I'm going for. Here is my style: <Style TargetType="ComboBox"> <Style.Triggers> ...

How can I best handle WPF radio buttons?

I've got some RadioButtons in my XAML... <StackPanel> <RadioButton Name="RadioButton1" GroupName="Buttons" Click="ButtonsChecked" IsChecked="True">One</RadioButton> <RadioButton Name="RadioButton2" GroupName="Buttons" Click="ButtonsChecked">Two</RadioButton> <RadioButton Name="RadioButton3" GroupName="Buttons" Click="Buttons...