I have a binding that when ever I set it and try to reload the design view, Visual Studio crashes. (This is in design view in the IDE, not at runtime.)
I am looking for a work around.
Here is the binding:
<Button HorizontalAlignment="Right" x:Name="btnPick" Grid.Column="3" Style="{StaticResource roundButton}"
Width="15" Heig...
I have a combobox created in code with 30,000 items in WPF, and it was truly slow - probably rendering all the rows. I did this to fix it:
cboValue = System.Windows.Markup.XamlReader.Parse("<ComboBox xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation""><ComboBox.ItemsPanel><ItemsPanelTemplate><Virtualizi...
I have two list view on WPF. The first listview is loaded with a Datatable. When double clicking on one item from the first listview, the selectedItem is moved to the second listview.
The problem arises when appears an scroll bar in the first list view due to a lot of elements loaded from the DataTable. If a select one item and double ...
I want to create a style for a WPF listbox that includes a button in the control template that the user can click on and it clears the listbox selection.
I dont want to use codebehind so that this style can be applied to any listbox.
I have tried using event triggers and storyboards and it has proved problematic as it only works first t...
In short my question is: How do you prefer to expose filtered/sorted/grouped ObservableCollections to Views in WAF?
I was fairly happy with my first attempt which involved filtering on the VM and exposing an ICollectionView of Model objects for the View to bind to:
public StartDetailViewModel(IStartDetailView view, StartPoint start, Sc...
Hi guys.
I'm gonna insert a Separator in a ListView in WPF , something like this :
image
I've used the following XAML code, but it dosn't work !
<ListView ItemsSource="{Binding ListViewItemsCollections}">
<ListView.View>
<GridView>
<GridViewColumn Header="Name" Width="200" DisplayMemberBinding="{Binding GridView...
Hi, I hope someone can help me with this one...
Unfortunately to put all the code in is just not feasible, however.. I am implementing the MVVM pattern, I have a content presenter that displays a UserControl.
The UserControl has a number of items on it with some basic CRUD functions, e.g. Edit, Delete, etc.
I have set up the Control, ...
I am Developing a mid-size application and want to implement Application Architecture, I've read some Architecture Books and Approach and think about
AAFN (Application Arcitecture For .net) presented by Microsoft
SOA
SDLM
SDO
MVC
and vice versa ...
this is a web application that will extended with some other small application ( j...
When its text is empty, I am attempting to set the background of a custom control to a visual brush using a trigger in the ControlTemplate. The following shows the relevant code:
<ControlTemplate.Triggers>
<Trigger Property="Text" Value="">
<Setter TargetName="MyBorder" Property="Background">
<Setter.Value>
<VisualBr...
I have a control with a combobox:
<ComboBox x:Name="TraceComboBox"
ItemsSource="{Binding SingleChannelList}"
SelectedItem="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type cc:LogicTriggerSimpleLevelControl}}, Path=SelectedTrace, Mode=TwoWay}"
>
Here's th...
I'm working on a Prism Composite application where I load different views into a region. I need to make sure that the view I'm loading is resized to the same height as the region. Each view is a usercontrol that has a Grid as the outer element. I'm using the following code
<Grid Height="{Binding RelativeSource={RelativeSource Find...
I have a TabControl with TabItems, The Tab Items have text and an icon. To do this I have to add a StackPanel to the TabItem.
However, once I add the StackPanel I can no longer control the default style of the text.
Resource:
<Style TargetType="{x:Type TabItem}">
<Setter Property="Template">
<Setter.Value>
<Con...
I am trying to understand MVVM pattern and I took a sample program to work on. The model is a C# .net library which when queried returns an IList object. I want my view to be able to add/edit/delete items in this collection thru' data binding. But I don't know how to start with this, using MVVM. Please help me out.
Model exposes an inte...
An application our company is working on currently displays many rectangle shapes with gradients to draw 'Tiles'. An internal discussion came about that posed a question of performance. These tiles are about 100 pixels by 200 pixels, and are either gradient shaded red, yellow, or green. At any given time, there could be up to 100 of thes...
Here are two screenshots:
A full-glass window over white background:
The same full-glass window over back background:
The question is: in WPF, how do I use TextBlock so that it will be readable on the glass?
I already tried
<DropShadowEffect ShadowDepth="0" BlurRadius="20" Color="White"/> with no acceptable success. (Maybe I did...
I have a tree that displays the directory and another panel that displays the files. Right now the files displayed have no icons. All i know is the path to the file. What i woudl like to do is get that files icon to display in that panel. I need the output to be and Image.source. Currently this is what i have
private ImageSourc...
I would like to perform a rectangual hit test on WPF Canvas component in order to get Controls that are overlapped by a Rectangle framework element. I found a Silverlight's VisualTreeHelper.FindElementsInHostCoordinates method, but apparently it's not available in WPF. What's the best method to achieve such functionality?
...
I am trying to save an XDcoument to a thumb drive which doesnt have enough memory space available. (This is a special test condition for the app) Though the application is giving an exception like below, I cant get that in the try catch block around the XDocument.Save(filePath). Looks like it is a delayed throw. Is it a LINQ issue or am ...
I would like my WPF Datagrid that is bound to my observable collection to have the blank row at the bottom so that the user can add more info. I've successfully bound the data, i.e. I can see it.
Why is the 'new' blank row not showing? Here is my xaml declaration:
<UserControl.Resources>
<CollectionViewSource x:Key="MyItems" Source="...
I would like to understand the general requirements for WPF/Silverlight layout for making it possible to implement pan&zoom (drag and zoom) features. I don't mean pan&zoom for an image but for a total page (window) layout (or part of it) with some controls.
What features of the layout and what features of used custom controls make layou...