Hi, I basically started today with WPF, and I'm astounded by how difficult it is to do binding. I have an array of Textboxes, in an ObservableCollection, and just want to bind that in my Listbox, so that they arrange themselves vertically.
I have fiddled around with this for 3 already, can you help?
I'm working in a Wpf "UserControl", no...
I'm trying to embed some fonts into a WPF dll.
I've set the build action on the fonts to Resource. Loading the fonts from disk works fine, but from a pack uri, I get an exception.
Is this an unsupported scenario, or am I just doing it wrong?
GlyphTypeface gtf;
//OK
gtf = new GlyphTypeface(new Uri(@"filePath\Fonts\cmex10.ttf"));
//thr...
Hi guys,
I have a Datagrid in my app. This datagrid fetches some data from a MySQL DB. They are fetched from a List<> to be true, because I'm not able to fetch the data from a Dataset (and I don't know why).
Anyway, when I update a field in my app i want these changes to be reflected on the list and therefore on the table in my DB.
Any...
I am having problems populating my treeview beyond the first level when the xml is using the same class name to have unlimited levels. I have used Xsd2Code to create the object class.
To keep this post from being 3000 lines long, I am including a link for downloading the project. It can be downloaded here
My XML example
<Testing>
...
Hello,
I'm currently writing DataTemplate for my custom type lets say FootballPlayer. In this template I would like to put ie. Button and make that button when clicked call some of FootballPlayer functions eg. Run().
Is there any simple or complex, but clean way to achieve this kind of behaviour?
The DataTemplate I believe is aware of...
Hi,
I'm using filters in WPF and I'm following the pattern suggested here.
To summarize, this involves a text property being exposed on the ViewModel which represents the text to filter by. When the property is set (by the binding from the textbox in the View) it uses CollectionViewSource.GetDefaultView(MyItems).Filter = blah to filter...
I need to do this in XAML :
<Grid x:Name="layoutRoot">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<SomeUserControl Grid.Row="0" />
<ui:AdditionalView.UseCase1>
<ContentControl>
<TextBlock>aaa</TextBlock>
</ContentC...
How to create a Button with menu? The same like on meny windows in Windows.
Example: while opening file:
link text
...
I have a question about a class I created that is similar to the ObserverableCollection. My class basically has the same same functionality as it, but I add some automatic sorting features to it when items are added to the List. My question is my class implements the interface INotifyCollectionChanged so that the ListView, which displays...
I have a dll with quite a bit of System.Drawing.Image resources that I have wrapped into static properties so I can update them dynamically.
I would like to use the images through xaml in a WPF application, but the only way I can figure is to do it through the code behind manually.
Is there a way to do the winform to wpf image converti...
I'm converting Xaml code to Xps but i can't use a canvas in a merged dictionary as Background of all the pages in a FixedDocument, because it throws an error on the second page.
The error say that the Canvas is already in use and i need to disconnect it.
I'm triyng to avoid putting a resource for every page because the resulting xps wil...
I am trying to bulid a WPF web application.I have 2 projects in the solution .One is of type WPF web application and another is of type ASP.NET web application where i need to embed the WPF stuff.The XAML file runs file when i set startup project as the WPF web app project.How can i add/embed this into the Default.aspx of my ASP.NET Web ...
Hi,
I have a Xaml Page with a Databinded ListBox and a detail grid to create or update selected element.
My Page.DataContext is binded on a ADO.NET Entity Data Model table ("Univers").
private void Page_Loaded(object sender, RoutedEventArgs e)
{
SEPDC = new Models.SEP();
universViewSource = new CollectionViewS...
Hello,
I have a window that opens another window. I want that when this window it's opened i can't do anything on the parent window. (I'm not allowed to click buttons for example)
How I can do that?
Thanks.
...
Ok this is going to seem really daft but but essentially this is what i'm trying to do in a nutshell ...
http://msdn.microsoft.com/en-us/library/dd465161.aspx
The problem is that when I create the WCF Data Service and browse to it everything looks good at the root level and as soon as I leave the root I get http 500 errors.
I get no d...
I am having a problem with Visual Studio 2010 crashing when opening a WPF user control on one computer. Whenever I open any WPF user control or try to create a new WPF user control in our product solution (any project in the solution), Visual Studio crashes.
I have uninstalled or disabled all Visual Studio add-ins (such as ReSharper and...
I have a custom Control derived class and a view model to go with. The user can do several actions with this control, and I'm thinking it's best to implement these as RoutedCommand objects or ICommand derived objects in the view model so the ControlTemplates can bind to them. Binding a command to a button in one ControlTemplate should be...
The reason I stress 'any' is because CanContentScroll is not fully working in my ScollViewer.
Let me explain the scenario:
I have a ScrollViewer that has three Labels followed by a ListBox each. The reason I have this content inside the ScrollViewer is because I don't want each ListBox to have a ScrollBar, I just want one "global" Scroll...
I'm trying to make a WPF user control that includes two group boxes and two listViews in each group box. Here is the XAML code for the user control:
<UserControl x:Class="TestGroupControl.TestGroupControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2...
I have a control within a ScrollViewer where the user can drag and drop elements around. I want the user to be able to scroll by dragging an element outside the bounds of the ScrollViewer, like how Windows Explorer will automatically scroll down if you drag a file past the bottom of the window.
I thought this would be simple to implemen...