There are not very many options for a virtualizing wrap panel for use in WPF. For one reason or another MS decided to not ship one in the standard library.
If anyone could be so bold as to provide a crowd source answer (and explaination) to the first work item on the following codeplex project, I would greatly appreciate it:
http://vi...
I am trying to duplicate the left/center/right alignment toolbar buttons in Word. When you click the "Left Alignment" button the Center and Right buttons uncheck. I am using a WPF ListBox with ToggleButtons.
The problem is the user can click the Left Alignment button twice. The second click causes the button to uncheck and sets the unde...
Can anyone point me to a very simple example(C#4.0) of a WPF Datagrid thats bound to a SQL table. I'd really like the simplist example possible. I want to be able to add, edit and delete rows. Thanks.
...
Remember the Amiga boing demo? I was reading a 25th anniversary of the Amiga article and they mentioned it. Brought back some memories. I remember a WPF (called Avalon at the time) demo put together to mimic it. I did some googling and found it here. However, it seems to be extremely out-of-date as the XAML markup and the code-behin...
Calling OnPropertyChanged for an ObservableCollection only works when there has been some change to the properties of the collection, not the objects it contains (add, remove, clear, etc).
Is there any way to notify the View that there has been a change to an item within the collection?
...
Writing another question for SO, I came to a pattern that I use very often and I never really reflected about. But now, I’m no longer sure if this is the right way:
If I have collections that my WPF-controls will bind to, I returned almost always IEnumerable<SomeType>. However internally , this is in most cases an ReadOnlyObservableColl...
Hi,
I have an app with a custom window (transparency and no borders). I made a header with a dragmove behavior on left mouse button down. This allows me to drag the window to the top so it maximizes. Now I want to write the code so that when I click the header and drag it, it restores the windowstate to normal...
Is there a click & dra...
I am trying to get a validation rule to return an error. I implemented IDataErrorInfo in my model, which contains my business object properties and messages to return in the event validation fails. I also created a validation rule. The problem is, the validation rule is firing (bookmarked it) but the IDataErrorInfo reference in the rule ...
I have been trying to get Mike Eshva's code from his answer about Animated Gifs to work, from here:
http://stackoverflow.com/questions/210922/how-do-i-get-an-animated-gif-to-work-in-wpf/1660225#1660225
Restated here (including translated comments):
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
u...
Hello everybody,
I am currently working on some 3D animations using WPF. I have been working on this project for around 60 to 70 hours (I cannot use any external libraries, so I had to do with WPF-included features) and all I have accomplished so far is:
Setting up WPF forms
Draw triangles, squares and cubes
Move around in the viewpor...
'ContentTemplate' is a DataTemplate that displays an object which has a member 'FooList' (an ObservableCollection).
<DataTemplate x:Key="ContentTemplate">
<ListBox ItemsSource="{Binding Path=FOO}">
...
</ListBox>
</DataTemplate>
I need to be able to filter that FooList using a CollectionViewSource. This is usually been...
What is the proportion of .NET developers who do WinForms/desktop development vs ASP.NET development? Is there very much overlap? Are they very different skill-sets?
...
I find it is scrolling too much at a time when the mouse scroll wheel is used. I have a very short ScrollViewer (one line tall) that contains a few lines of items in a WrapPanel, and it is scrolling right to the bottom in one "tick" so that the middle line is never visible.
...
Hi All,
I'm trying to create a custom file upload control in WPF 4.0 and I'm stuck in one point.
I'm not able to save file in my solution folder after browsing the file. Below code I'm using for Browsing
private void btnBrowse_Click(object sender, RoutedEventArgs e)
{
// Create OpenFileDialog
Microsof...
Aim:
When the mouse is over on a button then the button height should become double and the button should be displayed on top of other controls. Controls can be present in 'N'number of panels in a screen.
I am using VS 2010, I have a main grid with 2 Rows. Each row have 2 grids. Each grid have buttons. For example Grid 1 yellow have col...
What is the advantage of DLR in Silverlight?
...
In WinForms I used the following block of code to stop the application gaining focus by being clicked on:
private const int WM_MOUSEACTIVATE = 0x0021;
private const int MA_NOACTIVATEANDEAT = 0x0004;
protected override void WndProc(ref Message m)
{
if (m.Msg == WM_MOUSEACTIVATE)
{
m.Result = (IntPtr)MA_NOACTIVATEANDEAT;
...
Hello!
How can I set different fonts for tabitem header and content of this tabitem??
...
<ListView ItemsSource="{Binding MyData}">
<ListView.View>
<GridView>
<GridViewColumn Header="col1" DisplayMemberBinding="{Binding Path=value1}">
<GridViewColumn.CellTemplate>
<DataTemplate>
<TextBlock TextAlignment="Right" Text="{Binding Path=value1}"/>
</DataTemplate>
</GridVie...
We have a form that contains various elements and a datagrid. When the list box is contained in a scroll viewer, all is well when we increase the size of the window. When the window size is decreased the list box remains the same height and the vertical scrollbar becomes active. If you get rid of the height binding on the list box, the l...