Hi,
I cannot get DataGrid binding to work in the example bellow.
Any clues on what's going on ?
namespace WPFTestApplication
{
/// <summary>
/// Interaction logic for Window1.xaml
/// </summary>
public partial class Window1 : Window
{
public class Person
{
public int age { get; set; }
...
Please consider the following XAML code:
<ListBox Name="listBox1" ItemsSource="{Binding}" >
<ListBox.ItemTemplate>
<DataTemplate>
<Border Name="border1">
<TextBlock Text="{Binding}" />
</Border>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
and we assign a simple arr...
Need: Need to bind data to WPF controls for a user to update a database.
Approach: I am trying to implement a solution similar to this but am having an issue because I will be using a DataSet and not LINQ to SQL Class (hitting an Oracle db for my data). If this is a correct approach how can I do this?
I'm also thinking instead of addi...
I am drawing a block of text using a FormattedText object and DrawingContext.DrawText(...) and I am wondering if there is any way to add more space between the glyphs. If not, I can always draw each glyph separately and manage the location so I can add the space manually, but I am hoping for an easier way.
jorj
...
For a project I'm working on I needed to create a treeview with drag/drop reordering. Before messing with the actual project, I subclassed treeview in a separate project and added handlers for the Drop, DragOver, MouseMove, and DragLeave events and implemented them as necessary. Drag and drop reordering works fine for the side project be...
Hi,
We have a few scenarios in our WPF/MVVM application where a window is being instanciated and opened within the confines of a method. Very simplistic example:
Private Sub subOpenWindow
Dim myViewModel = New Viewmodel1 'create viewmodel that Window1 will use as datacontext
AddHandler myViewModel.SomeEvent, AddressOf subHandle...
I created a Process.
That one has a MainWindow I want to SendKeys.Send("+F") (CTRL+F) to, but I don't know how to do this.
So how is this done?
...
Hi,
Im trying to display a group (file extension and icon)(parent) then all of the files found in that group (child) in a WPF Treeview. I can get the groups to show in the treeview, each with an icon and text, however I dont understand how to display the files as children of the group. Here is the GroupInfo class, the problem is it cont...
I am using a telerik RadCalendar in my WPF project. I am using a 3 months view style so at a time 3 months are displayed. When you press the left arrow, the previous 3 months are displayed and so on.. Is there a way to get all 3 months in view at a moment. example if May, June and July are currently being displayed then I should get 5,6 ...
I have a WPF DLL containing a few forms I'm trying to call from a VB6 app. I've got most of the interop figured out. I can open the forms fine and for the most part they work fine. They operate on their own and don't need to communicate with the VB6 app. The problem I'm running into is that when the WPF forms open the first time I hi...
I have a custom user control I wrote in WPF to display some data. I want to show this usercontrol in a list, but I also want to provide multiple column headers (matching some properties on the user cotrol) so users can sort on properties contained in the usercontrol.
I am not sure the best way to go about this.
I currently have a Lis...
I want to focus on multiple dates in multiple months in a 3 month wide telerik RadCalendar view on my WPF project. Right now only the current date (today's date) gets highlighted (or focused). I want to focus on other dates too besides today's date. Any suggestions/ideas how to go about it?
...
I have a number of items which I wish to be contained in either a ListBox or an ItemsControl. The size of the control is fixed, but the size of its contents are not. It is possible for this control to have 13 items inside, but if the user wishes, only one is displayed at a time, and takes up the entirety of the available space. Two items...
I have a custom login usercontrol that has a normal textbox and a passwordbox.
Blend refuses to cooperate with the passwordbox saying that "DP.UnsetValue" is not valid for PasswordChar property. However the project compiles and runs fine in blend or in VS2010. The cider designer in vs2010 doesn't seem to mind the error because it actua...
Hi,
I'm trying to do an "empty list to visibility converter" for WPF.
This is an IValueConverter that takes an object ( that should be a list ) and if the list is empty (or if the passed object is null ) it should return Visibility.Collapsed; if the list is not empty it should return Visibility.Visibile;
I plan to use this for a datagr...
I am working on an application in C# using the .NET Framework 3.5. I have a TextBox on one of my forms that is bound to the "ID" property of the DataContext of the form, like so:
<TextBox x:Name="txtID"
Grid.Row="0" Grid.Column="1"
Margin="2" MinWidth="200" VerticalAlignment="Top"
Style="{StaticResource validationToolTip}...
How can I apply a static resource by name based upon data? I know that I can write a data trigger for styling properties, but I want to apply an entire style based upon bound data.
Ex:
if (condition) CellValuePresenterStyle="{StaticResource OptionalFieldCellPresenter}"
else CellValuePresenterStyle="{StaticResource RequiredFieldCellPres...
hey,
i've got a wpf application that have a doubleanimation used for scrolling text and images (scrollbar) from the left side of the screen, to the right, and a movie playing, in the same window.
everytime a video ends, and a new video loads, the doubleanimation get stuck/hangs for a second, then it continues normally. i assume it's the...
I'm looking for a good article that compares MVVM Light, Caliburn Micro, Prism, and any other Silverlight / WPF / WP7 frameworks out there. I've seen some good articles on them individually, but nothing that really pits them against one another. Any suggestions?
...
How can I get a named resource from ControlTemplate in a code-behind file (*.xaml.cs)? TryFindResource returns null. Template property of the control is also null. What else should I try?
Thanks.
...