I have a UserControl which basically wraps a ListBox like this -
<ListBox x:Name="lb" ItemsSource="{Binding ElementName=UC,Path=Pages}"
Background="{Binding ElementName=UC,Path=Background}"
BorderBrush="Transparent"
ScrollViewer.CanContentScroll="False"
ScrollViewer.Horizonta...
Hello, I am currently trying to create some basic word processor features in a WPF project. I am using a RichTextBox and am aware of all of the EditingCommands (ToggleBold, ToggleItalic...ect.). The thing I am stuck on is allowing the user to change the fontsize and font face like in MS Office where the value changes for only the selecte...
I hoped the answer to my previous question whould help me with this one, but it didn't. the initial situation is pretty much the same:
<TreeView ItemsSource="{Binding Groups}" Name="tvGroups" AllowDrop="True">
<TreeView.ItemTemplate>
<HierarchicalDataTemplate ItemsSource="{Binding Participants}">
...
I have ObservableCollection<Foo> that is bound to an ItemsControl (basically displaying a list).
Foo mostly looks like this (there are other members but it doesn't implement any interfaces or events):
class Foo
{
public string Name { get; set; }
//...
}
When the user clicks on an item I open a dialog where the user can edit Foo's...
I'm hoping to display a multi-valued column in a tabular UI format. By multi-valued column, I mean a column in which a single cell can simultaneously have multiple values -- aka a list of values. These values might be drawn from a short list of possibilities (e.g. an enumeration) or from a long list (e.g. another table). Imagine a tab...
Interface functionality isn't important (right now) with the children, but it would be handy if there were some way to say that the child can be both "here" and "there" and that it should be treated as a single object.
I am implementing a repeating, scrolling viewer that treats its canvas as a repeating plane, and I would like to be abl...
I'm fairly new to WPF and trying to understand how best to extend the ListBox control. As a learning experience, I wanted to build a ListBox whose ListBoxItems display a CheckBox instead of just text. I got that working in a basic fashion using the ListBox.ItemTemplate, explicitly setting the names of the properties I wanted to databind ...
I'm working on a WPF app with a ViewModel in C++/CLI, so it can use legacy C code. I'm having trouble exposing the namespace System.Windows.Input to the C++/CLI code and wondering if this is because WPF doesn't really support C++/CLI? Do I really have to insert a C# layer in order to implement something like Josh Smith's CommandSinkBindi...
I'm using the WPF DataGrid, and I'd like to know if there is any way I can access the DataGridRow's RowDetails programatically.
For example, when the user selects the row, I'd to grab some data from somewhere (say, a database), and display it in the RowDetails.
All of the examples I've seen tend to just display some extra bound data t...
I have a WPF TreeView control that is binding to an XMLDataProvider. The nodes are appearing fine within the Treeview control however the following error is appearing:
System.Windows.Data Error: 43 :
BindingExpression with XPath cannot
bind to non-XML object.;
XPath='Text/*'
BindingExpression:Path=;
DataItem='XmlDataCollec...
We have a XBAP application which has the following code in a Page:
Person newPerson = new Person();
PersonWindow personWindow = new PersonWindow(newPerson);
personWindow.ShowDialog();
Now this code is invoked from a XBAP page, the resultant window does not behave like Modal window, is there any way to achieve this without ...
I am currently trying to figure out a way to change the Bullet MarkerStyle when EditingCommands.ToggleBullets is executed. From what I understand CommandManager.Execute is executed before the togglebullets is done. So I am unable to simply go in and change the List.MarkerStyle with the ExecutedRoutedEvent.
Can anyone point me in the righ...
Hello,
I try to set video source in XAML code, video doesn't play:
<MediaElement x:Name="bgvideo" Width="800" Height="600"Source="/Videos/BG_LOOP_BIG.wmv" />
So I try to set video source in codebehind, that doesn't play too. :
bgvideo.Source = new Uri(@"pack://application:,,,/Videos/BG_LOOP_BIG.wmv", UriKind.Absolute);
or
bgvide...
How would I clear the TreeView selection within a WPF TreeView? I have tried looping through the TreeNodes and clearing the IsSelected property however that is a ReadOnly property. Any ideas?
The TreeView is using XML Binding through the XMLDataProvider object.
...
Hi,
I have a few images with some text, I need to show the image with the relevant text in a listbox.
Browsing google I came across this sample class,
public class Customer
{
public string Fname;
public string Lname;
public Customer(string firstName, string lastName)
{
Fname = firstName;
Lname = lastName;
}
public overri...
I have created a custom panel (MyCustomControl) that can contain other controls and be configurable through dependency properties. Inside a different user control (MyUserControl), I have multiple instances of MyCustomControl configured in XAML.
Outside of the user control, I am trying to bind an ItemsControl (myItemsControl) to the l...
In my WPF Application I have a canvas with a Listbox in it. I want to overlay an Listboxitem with another control after it was clicked on the item. But for that I need the position of the Listboxitem in the canvas.
I see the problem because the single Item is not child of the canvas. Only the Listbox itself is.
Is there any way I can ge...
I want to enable the user to highlight a row on the WPF DataGrid and press delete key to delete the row.
the functionality is already built into the UI of the grid, so to the user, the row disappears
I currently handle this on the SelectionChanged event (code below)
I loop through all the "e.RemovedItems" and delete them with LINQ
Pr...
Hi
I've a shell window constructed of an Header, Main Content and Footer.
The main content is a tab control.
According to the design, one of the tab items content (a user control) needs to expand a little bit over the footer.
At first I thought about implmenting this with a negative Margin, but the footer no matter what I did always get...
I'm trying to trigger an animation declared in the window's XAML file from the window's vb code when an event is raised (calling a function), like a window's "loaded" event.
Here's how I declare the animation (as a storyboard):
Dim StartAnimation As Storyboard = DirectCast(FindName("ServiceOn"), Storyboard)
Dim StopAnimation As Storybo...