Hello everyone,
I tried to look around to see if I am missing something basic, but I can't seem to understand what I am doing wrong.
I have a listbox where I would like to bind the itemssource to a collectionview of photos from a dataset. The problem is, I need to take the directory where the images exist from the MasterView Collectio...
I am binding an Image's Source property to a URI string property on the model:
<Image Validation.ErrorTemplate="{StaticResource validationTemplate}">
<Image.Source>
<Binding Path="LargeImage.ImageUri">
<Binding.ValidationRules>
<ExceptionValidationRule/>
</Binding.ValidationRules>
</Binding>
</Image.Sourc...
Hi all,
I have ComboBox item style as follows (simplified):
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="35"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" />
<Path Grid.Column="1" Style={StaticResource StarStyle}/>
</Grid>
The result is as expected. An...
I am working in C# and VS2008.
I have a WPF application containing a FlowDocument, which contains a paragraph, which contains a number of fairly short lines (i.e. Spans and LineBreaks). However the length of lines varies. I would like the FlowDocument's width to be large enough to accommodate the longest of these lines without wrapping,...
My assembly includes an image with BuildAction==Resource. I want to obtain a BitmapImage from this embedded resource.
I can load a BitmapImage from file like this:
var bitmap = new BitmapImage(new Uri(path));
But how to I create a Uri that will refer to an embedded resource image?
When I try and create a 'pack URI' (for example pac...
The following code is a refactoring of my previous MVVM approach (Fat Models, skinny ViewModels and dumb Views, the best MVVM approach?) in which I moved the logic and INotifyPropertyChanged implementation from the model back up into the ViewModel. This makes more sense, since as was pointed out, you often you have to use models that you...
How to create a interactive 3D object in WPF? For example it can be a 3D Cube which can be rotated and with "tap" gesture for each side triggering different action.
...
Hi iam trying to access a button in a .xaml file within a code behind file of my MainWindow.xaml . I Have tried to use x:Class in the file but when i use it the button works but i get alot of other errors. so i prefer not to use this method.
Is there any other ways to access controls in a template with a frpm the mainWindows class.
...
I understand that in MVVM:
the View knows about the ViewModel
the ViewModel knows about the Model
but it doesn't work upwards, so the Model knows nothing about the ViewModel
and the ViewModel knows nothing about the View
So how does the ViewModel respond to actions that the user does on the View, e.g. type something into a TextBox or...
I'm trying to load an external XAML file using this code:
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/OfficeStyle;component/OfficeStyleWindow.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictiona...
Is there a way to print a standard test page in WPF from C# code if I have the name of a network printer?
Thanks!
...
Hi,
I have a TreeView setup so that each TreeViewItem has right-click context menu applied as a Style. Something like:
<Grid.Resources>
<ContextMenu x:Key="contextMenu">
<MenuItem Header="Save" IsEnabled="{Binding Path=Saveable}"/>
<MenuItem Header="Copy" IsEnabled="{Binding Path=Copyable}"/>
<MenuItem H...
I have a WPF Toolkit Datagrid with 3 columns. Only the third column allows data entry - the first two are static (Text descriptions). Is it possible to control tabbing and navigation such that the tab and up-down-left-right buttons will ignore the first two columns and operate within the confines of the third?
Thank you
Jason
...
Hello,
I found a tutorial to do syntax highlighting in RichEdits for WPF:
http://blogs.microsoft.co.il/blogs/tamir/archive/2006/12/14/RichTextBox-syntax-highlighting.aspx
But if I open my list of commands from a file the Editbox becomes very very slow... maybe there are too much words to highlight.
I read that WPF elements like RichEd...
My google skills fail me. Anyone heard of a control like that for WPF. I am trying to make it look like this (winforms screenshot).
...
When I start up VS 2008 to work on a WPF / Silverlight App and open a XAML or XML file the XAML / XML editor is no longer working. The designer does not show up and intellisense is unavailable. It basically looks like a text file has been opened.
...
I'm building a WPF app and I'm tyring to find information or a walk through on how to make it accessible for screen readers. I've trawled through MSDN and found some articles regarding UI Automation (UIA). Basically I found a lot of "okay, this is UIA! it's used for testing but also accessibility" but nothing along the lines of "this is ...
Hello all,
I have a problem updating the WPF Designer when binding to custom dependency properties.
In the following example, I create a simple Ellipse that I would like to fill with my custom MyAwesomeFill property. The MyAwesomeFill has a default value of a Yellow SolidColor brush.
The problem is that in the control form of the des...
Hi everybody!
I've got a stackpanel, and it's perfect for laying out columns that the user adds at runtime. But I'd like the columns to be resizable, and I was reading about the control. Here's what I'm wondering:
Is the gridsplitter the wpf replacement for the WinForms splitter? In other words, is this the de facto way to allow the...
Hi,
In my 3d application, I have a TreeView that's databound to an ObservableCollection of objects in my 3d scene. In theory a user can click on an object in the 3d view, which should update the TreeView to select the corresponding item. But I don't exactly know how. All I have is the 3d object the user picked.
How do I go about doing...