xaml

Add TODO: into XAML so that is shows on my task list in visual studio

Hello there, Does anyone know how to add todo: items into XAML? I am in the habit of using //TODO: in my code for things that I have to come back and fix up. I can't seem to find out if this is possible to do in XAML? I would like to add things to my tasklist that point to XAML. :( Any idea's would be appreciated, thank you. ...

Is it possible to name something in XAML without getting a field for that object?

I use x:Name to name an element in XAML because I want to be able to reference it using Storyboard.TargetName but everything that has x:Name set also gets a field generated in the code-behind. Is it possible to target an element with Storyboard.TargetName without getting a field (which FxCop gives a warning about unused private code for)...

Channel Factory problem communication with .xamlx

Hello, We have a program calling xaml service via channel factory. The problem occurs when we try to call the service multiple times. The error is : The open operation did not complete within the allotted timeout of 00:00:30. The time allotted to this operation may have been a portion of a longer timeout. In xaml service web.config...

Disable CTRL+P in WPF DocumentViewer

I'm working on a new presenation component for one of our applications. I am building a Custom WPF Control that just has a DocumentViewer in it and hosting that CC in a Windows Forms application with an ElementHost. I'm using Visual Studio 2008 with C#. I have customized everything through the XAML to give it the look and feel that in...

XAML Binding to a CollectionViewSource property on a ViewModel

I have a simple ViewModel like: public class MainViewModel { ObservableCollection<Project> _projects; public MainViewModel() { // Fill _projects from DB here... ProjectList.Source = _projects; ProjectList.Filter = ...; } public CollectionViewSource ProjectList { get; set; } } I set the window's...

How to correctly bind an object to a WPF DataGrid?

I'm trying to get a WPF DataGrid to work from a user control I'm building. Things seems to work fine. But I noticed this message in the Output window in the IDE: System.Windows.Data Error: 39 : BindingExpression path error: 'Name' property not found on 'object' ''Object' (HashCode=18165668)'. BindingExpression:Path=Name; DataItem='Obje...

Hierarchy as grid

I have hierarchy: public class Parameter { public string Name { get; set; } public Value Value { get; set; } } public abstract class Value { } public class StringValue : Value { public string Str { get; set; } } public class ComplexValue : Value { public ComplexValue() { Parameters = new List<Parameter>();...

how to draw X Y Z 3D animation in WPF?

My ArrayList has X Y Z (matrix) I want to draw X y Z in WPF and have a 3D animation when drawing. How can I make a 3D environment in a WPF application? ...

Bizarre problem with WPF XAML file.

I've just started a very simple WPF application which consists of a main large image and four smaller images. In order to assist with the layout, I created some JPEGs in MsPaint containing the images -2, -1, 0, +1 and +2 and just copied them into the top level of the project directory. The XAML segment contains, for the five images: <...

XAML | When used XamlReader.Parse, not able to refer the items using the LogicalTreeHelper/VisualTreeHelper

Hi, I am setting the dynamic xaml (I am reading the xaml from the DB) for the content of a tab using the below statement. Tab.Content = XamlReader.Parse(xaml, ctx) After setting the content, if I try getting the children using the VisualTreeHelper, but I am not able to get. How ever I dont have this issue when I construct the xaml st...

WPF 3D Editor which look like 3DSMAX

Hi, Is there any source for a WPF 3D editor (4 viewport : perspective,front,top,left) Thanks ...

Why doesn't keyboard input work for a ScrollViewer when the child control has input focus?

Why doesn't keyboard input work for a ScrollViewer when the child control has input focus? This is the scenario. A WPF window opens. It sets the focus to a control that is embedded in a ScrollViewer. I hit the up and down and left and right keys. The ScrollViewer doesn't seem to handle the key events, anyone know why? This is the s...

Fill panel with rectangles

I want to fill a panel with rectangles, and when the panel is resized, the rectangles should resize as well. Why doesn't the following work? <Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"&gt; <StackPanel HorizontalAlignment="Stretch" VerticalAlignment...

Sharing state/changes across ViewModels

I have an App which has a Tasks tab and a Projects tab. I decided to make a separate ViewModel for each of the tabs, TasksViewModel and ProjectsViewModel. The Tasks tab has a new task area with an associated project pulldown and the Projects tab (obviously) has a list of projects. What I'd like is for the pulldown on the Tasks tab to s...

Why might a silverlight ListBox on Windows Phone not allow me scroll all the way down to the bottom?

I have a ListBox in a grid that gets databound when the page loads... pretty straightforward. The problem I'm having is that, after the box is databound, I can scroll... but not all the way to the bottom of the list. It stops an item or two short and won't let me scroll anymore. Here's the listbox XAML: <Grid x:Name="ContentGrid" Grid.R...

WPF StringFormat={}{0:N} Error "Expected '"

I'm getting an error in VS 2008 SP1 with WPF using the stringformat binding, is there an inherent problem with wpf in vs 2008? Error 1 Expected ' ConstituentCrossrateGridControl.xaml 70 141 PriceViewWpfLibrary ...

Is it possible to make customizable WPF styles?

I really like WPF because of its awesome skinning support by changing resourcedictionaries on the fly, but the catch is, the styles must be made by designers in XAML. My client needs a skinnable UI where the end users can make skins themselves. My question is - In Photoshop, you can take any image, and add a color overlay to change all ...

silverlight, xaml, threading problem

Hi! I want to have a thread, that polls the webservice. Howerver the thread doesnt work ... xxx.xaml.cs: public class Alpha:Page { // This method that will be called when the thread is started public void polling() { while (true) { Thread.Sleep(1000); ...

Accidentally deleted the code behind for an Xaml file. How do I add the code behind again?

Instead of excluding it, by mistake, I deleted the .cs code behind file for an Xaml file. Now, I don't know how to add the code behind. This Window is empty with no UI controls on it. "View Code" is disabled and I can't see the Events (lightning bolt icon) anywhere for this xaml. Please help. ...

How do I right-align the 'help' menu item in WPF?

I have the following (simplifed) section in my XAML file: <Menu Width="Auto" Height="20" Background="#FFA9D1F4" DockPanel.Dock="Top"> <MenuItem Header="File"> <MenuItem Header="Exit"/> </MenuItem> <MenuItem Header="Edit"> <MenuItem Header="Cut"/> </MenuItem> <MenuItem Header="Help"> <MenuItem ...