xaml

INotifyPropertyChanged on a UserControl return an infinite loop

Hi all, I am trying to make a Facebook Client and I have XAML file like this : <UserControl x:Class="UISkripsi3.Sidebar" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://s...

Binding to ItemsSource not working until visual element is manually inspected (MVVM)

I have the Xaml which should basically bind a set of ContextualButtons for a selected tab's viewmodel to the ItemsSource property of the ToolBar. For some reason, this binding is not actually occuring unless I use Snoop to inspect the element manually...It seems that the act of snooping the element is somehow requerying the binding some...

Set a default value in combobox programmatically

I am working on WPF. I am using visual studio 2010, .NET 4.0 and using a Radcombobox in my application. It is getting populated correctly with 3 strings in it and now I am having trouble choosing a default value. I want to select the first index value as the default value when it starts up loading the 3 strings in the combo box drop dow...

WPF dependency properties - set in XAML when base class is generic

Hi As per the title really, how can you set a dependency property in XAML when the base class is generic? When trying to do this I get a NullReferenceException, setting the property from code behind works fine. It also works when the base class is not generic. I'm using .NET4 Here is some sample code to demonstrate: WindowBase.cs usi...

XAML Designer and VS 2010 hanging

VS 2010 hangs when using the XAML designer. I don't think I have memory issues as the system has 4 gigs of RAM. I know that there were issues with VS 2008 SP1 that was fixed a patch. They don't seem to have one for VS 2010. Anyone else has this issue? Is there a workaround in using the designer? Anyone? Thanks ...

Toggle ToolTip of a Button control using only XAML

The title explains the end-goal. Right now the problem is that I can't even change the ToolTip with one click to something else. My XAML is: <Button x:Name="btn" Height="24" Margin="107,59,109,0" VerticalAlignment="Top"> <ToolTipService.ToolTip> <TextBlock>Hi</TextBlock> </ToolTipService.ToolTip> <i:Interaction.Tr...

How can I set the content of a WPF button to be a Canvas in a separate xaml file generated by expression design?

I used expression design to export my vector image as a .xaml canvas. I then included this file in my project. I have a button that I want to set the content to this xaml described image. Any help would be appreciated. Should I set the .xaml canvas image thing to have its build action be resource? What's the xaml look like that conn...

In WPF how do I reference a static resource that is defined in a different XAML file?

In WPF how do I reference a static resource that is defined in a different XAML file? It's in the same project. ...

databinding hidden (non visible) combo box in xaml

Hi, I have a problem binding data to a combobox that's in a secondary (not initially focused) tab. Basically, I have a silverlight form with multiple tabs, whenever I move this combobox to the first (main) tab, the data is loaded and everything works as expected, but when this combo box is in a secondary tab that doesn't have focus init...

How can I enter a string literal containing the dot character in XAML (Silverlight 4)?

Hello, Maybe this is something obvious, but here is what I have. I need to write a string in XAML. That is ok, but if the string has the dot character inside it, the XAML parser fails. I tried all kinds of escaping, but nothing helps. <datafilter:ItemPropertyDefinition Name="Players.Count" ...

Different Xp styles are changing my control apperances, how do I avoid it?

I thought everything was looking good with my user controls, styles and layout etc, until I released a version for the user to test. They asked if the Toggle button could be Green when checked. I said it is, but it wasn't. I checked on my machine and it was Green. Turns out he has a different xp style set to me. i.e. he has 'Windows...

Does anybody know where I can download libraries of 3D models purely in XAML?

I am looking for 3D models that are 100% XAML. ...

WPF C# - Using Xaml to load folder of images

Hello, In my on going quest to learn C#, both winforms and WPF, I have whipped up a program similar to visio in WPF. Its using the new WPF ribbon control, and am using a expander to hold some basic shapes that can be made in Xaml(ie. Ellipse), and the shapes are stored in a 'shapebox' that the shapes can later be dragged onto the form a...

Input validation in textbox in windows phone 7

I am new to windows phone 7 development platform.I am trying to do validation for textbox input. On debugging ,in case of invalid input , I get the error "exception was unhandled".How to correct this?This code works fine for silverlight application. TextBox Text="{Binding Name, Mode=TwoWay, NotifyOnValidationError=True, ValidatesOnExcep...

Accessing TextBox in a DataTemplate

Hi all, I have the XAML like this. (This code is just some part of my source code) <UserControl x:Class="EmployeeClass" ...............> ............. ............. <ListView x:Name="EmployeeList" Width="700" Height="500" Margin="10" ItemsSource ="{Binding Source={x:Static local:Company.employeeList}}...

Very simple databinding crashes / GlobalOffsetZ / Windows Phone

HI there, I'm playing around with the new Windows Phone 7 SDK and have a prob here... xaml <Rectangle Fill="#FFFFEA00" Stroke="Black" Height="300" Width="300"> <Rectangle.Projection> <PlaneProjection GlobalOffsetZ="{Binding Path=Test}" /> </Rectangle.Projection> </Rectangl...

WPF: How to use DatePicker in XAML-DataGrid

In a standanlone WPF app I got a DataGrid to enter some values. For text values this works nicely just like this: <DataGrid AutoGenerateColumns="False" ItemsSource="{Binding MyCollection}"> <DataGrid.Columns> <DataGridTextColumn Header="Name" Binding="{Binding Name}"/> <DataGridTextColumn Header="Description" Binding="{Binding...

Binding WPF TreeView to Object

How to bind TreeView to the grouping collection ListCollectionView? code cs: ListCollectionView view=new ListCollectionView(Global._subjectCollection); view.GroupDescriptions.Add(new PropertyGroupDescription("Fund")); view.GroupDescriptions.Add(new PropertyGroupDescription("Cipher")); treeView1.ItemsSource = view.Groups; code XAML: ...

How to update a part of a WPF custom style

Hi all, I have created a custom window control (inherited from Window), all is fine except the text of my status bar. I have added a new property to my control called "StatusText" and this text is shown inside a TextBlock in my control's style. But when I change the StatusText property of my window the text doesn't change, it's not upd...

How to change appearance of TabItems in a scrolling WPF TabControl?

Hello, I have a scrolling TabControl, using a ScrollViewer and StackPanel (with the StackPanel set as IsItemsHost="true"). To begin with, I am working from a solution originally outlined here - Creating Scrolling Tabs Using WPF's TabControl . At the moment it has broken links (Edit: I have tracked down one instance of his code in a fo...