wpf-controls

ListView DataTemplate binding

I have the following ListView: <ListView Name="listView"> <ListView.View> <GridView> <GridView.ColumnHeaderContainerStyle> <Style TargetType="{x:Type GridViewColumnHeader}"> <Setter Property="Visibility" ...

Could I get some wpf specific design resources for best practise in themeing controls?

What are some wpf specific design resources for best practise in themeing controls? Could you design legends point me to some sweet resources for themeing of WPF controls? I'm familiar with some of the MSDN stuff, hoping for maybe more blogs,walkthroughs etc by 3rd parties with experience in this area. I've been googling but keen to get...

show data of webbrowser control in flowdocument.

hello, I have a web browser control whose sample data comes from the rawhtml which is - "This is a sample bold text which is underlined.  color of this text is red. " note - replace ig with img. Once the web browser loads the above rawHtml ,I notice that it displays the data appropriately including the image. I would like to show the d...

Is it possible to create sub-headers in a WPF DataGrid?

For example, say I am maintaining an inventory of the different produce my friends have and want the following table: | People | Fruit | Vegetables | | | Apple | Orange | Berry | Carrot | Lettuce | | Adam | x | | x | x | | | Bob | x | x | | | ...

ScatterView and ViewBox is not working as expected

I defined the following layout: <Grid Name="RootGrid" Background="{StaticResource WindowBackground}" > <s:ScatterView Name="RootScatter"> <Viewbox> <s:LibraryContainer Name="RootContainer" Grid.Row="0" ViewingMode="Bar"> <s:LibraryContainer.BarView> <s:BarVi...

Update WPF ProgressBar that is bound to a dependency object running a long process.

I want to bind the value property of a WPF ProgressBar to a dependency property that is updated during a long running process. If the long running process is called from the main thread then this blocks the UI (and hence the ProgressBar) from updating until the process completes - preventing the desired progress through the process being...

WPF Binding individual text boxes to an element in a collection object or array....

I need to bind a textblock.text property to a single element in an observable collection, or array element, and have the text update using the INotifyPropertyChanged or INotifyCollectionChanged, whichever is best. Most examples describe ways to bind listboxes or other list views to entire collections, but my application needs to update ...

WPF toolkit Accordion control appears to not use UI Virtualizing. Is there a way to get it to use UI Virtualizing?

I am using the WPFToolkit Accordion control with the items in the accordion defined to be a TreeView. For context, here is the relevant part of the XAML: <ScrollViewer VerticalScrollBarVisibility="Auto" CanContentScroll="True"> <layoutToolkit:Accordion DockPanel.Dock="Bottom" HorizontalAlignment="Stretch" ...

WPF - How to paint notebook-like lines as TextBox background?

A bit similar to this question. My aim is to evocate a notebook-like look of the textbox. OneNote does something similar, by setting background image of the editing surface. Of course it is not possible to align the lines in OneNote because the text can be freely formatted. I would like to do this with constant font (no formatting)...

Exception: The specified Visual is not an ancestor of this Visual

The following method thrwos an exception in the line: Point childPosition = vb.TransformToAncestor(surfaceWindow).Transform(new Point(0, 0)); But if you look at the code, the vb is surely a child of surfaceWindow. So why isn't this working? if (!isExpanded()) { Viewbox vb = new Viewbox(); ...

ListView ItemContainerStyle Template

I created style to be used as my ListView's item template that contains a CheckBox and a TextBlock: <Style x:Key="CheckBoxListStyle" TargetType="{x:Type ListView}"> <Setter Property="SelectionMode" Value="Multiple"></Setter> <Setter Property="ItemContainerStyle"> <Setter.Value> ...

Cannot find resource named 'Locator' thrown at design time in Blend 4, WPF4.

Hello everybody, In the application I am developing, I have a MainWindow, which is divided in several Views. Each View is a UserControl and has its own ViewModel. By setting a DataContext inside the UserControl, I am able to work in Expression Blend 4 with design-time data. Ops, forgot to say: I am using the "basic" Locator class, no M...

Scrolling to the end of a single line WPF TextBox

This seems like such a simple thing but I just can't get it to work. I have a single line text box that has a lot of text. What I want to happen is that whenever the text box receives focus, it scrolls to the end of the text so that it comes into view and the cursor is at the end ready to accept new text. In the text box's GotFocus ev...

How do I change WPF Menu's icon column size?

I have a WPF ContextMenu that looks like this: <ContextMenu Width="300"> <MenuItem Command="{Binding MainWindowViewModel.NewCommand}"> <MenuItem.Icon> <Image Source="pack://application:,,,/EAV.UI;component/Resources/Icons/MenuNew.png" Width="32" Height="32"/> </MenuItem.Icon> <MenuItem.HeaderTemplate>...

How to update Controls from static method?

Hello Why I haven't access to my private control on form (e.g. ListBox) from a static method? How to update control in this case? EDIT 1. my code: ThreadStart thrSt = new ThreadStart(GetConnected); Thread thr = new Thread(thrSt); thr.Start(); and static void GetConnected() { //update my ListBox } ...