wpf

WPF: Different content templates for run-time and design-time?

I have a custom lookless control derived from Control. The "goal" was to have my custom control be a tab control with two predefined tabs, some controls within each tab, and a contentpresenter within each tab where the developer can put their own stuff. I have a dependency property and binding for each content presenter, and it does work...

Unit Testing WPF Dispatcher

It's been asked and answered but I'm not getting it. In my NUnit tests, I create a Canvas. I save off the dispatcher. Then I create a thread to "LoadData". From LoadData i need to Dispatcher.Invoke back to the thread. I don't have a strategy for pausing or keeping the primary test thread running, and if I do pause or suspend the prim...

Grant WPF application access to local drive?

Hello, I'm writing an application in C# (it's very basic, for a friend of mine), but I have a StreamWriter object that creates a local file in C:. I have to do Run as Administrator, and it works fine, but otherwise it crashes with "Access to the path 'C:\final.html' is denied." I've never worked with any sort of security or permissions...

WPF Custom Control based on TabItem and Themes

I have a Generic.xaml theme created that sets styles for all common controls, including TabItem This them is applying ok to all controls in the application When I create a TabItem control and display it, it gets the Theme OK. TabItem t = new TabItem(); t.Header = "Normal"; MainContentControl.Items.Add(t); However when i create a Cu...

Searching for an interesting Topic for my Bachelor Thesis .NET

Hi I am currently searching for good topics for my Bachelor Thesis. I definately want to do something with .NET and maybe WPF. So far I have no idea what to write about :( Maybe anyone of you guys have a good idea ? It mustn't be WPF related but it should have to do with .NET and C# At first I thought I could write about WPF in combin...

MVVM with webservice

I'm going to do a wpf application using MVVM(It based on http://www.codeproject.com/KB/WPF/MVVMQuickTutorial.aspx ). This application will be connecting with webservice one per month. On webservice I have contract public class Student { public string Name {get; set;} public int Score {get; set;} public DateTi...

WPF beginners video tutorials

Hi, Can someone please suggest some site/reference for WPF video tutorials for beginners? Thanks for your interest. ...

how can i find the location of execute of my application in WPF (C# or vb.net) ?

Hi Friends how can i find the location of execute of my application in WPF (C# or vb.net) ? i used this code on windows forms . Application.ExecutablePath.ToString()); But IN WPF i had this message from Visual studio that : system.window.application does not contain definition for ExecutablePath. tnx for ur attentions :) ...

Alternative to WPF DataGrid using .NET 3.5 SP1

I am building a WPF Application using C# in VS 2008/.NET 3.5 SP1. I am trying to use the DataGrid control but when I create it in the XAML view the XML validator complains that the type is not found. Also, the IntelliSense list does not display an option for DataGrid. According to the docs, it seems this control is not supported until ...

WPF modal window behaves weird

Hi everybody! I 'm running into a situation i don't understand and want somebody to enlighten me if possible. Created a WPF application. For sake of simplicity consider this application to be one window. I put some controls on this window, amongst others there is a TextBox control (let's call it TB). There is a requirement that this T...

Preserve RichTextBox selection after reset?

I'm using a RichTextBox in WPF and want to: Input text Save text to an object Save the selection Clear RTB Insert the text from the object Set the previous selection again 1 and 2 is done, easy. I can easily save the selection using the Selection property on the RTB to get the TextSelection object. But after clearing the RTB the, the...

Binding to UserControl in WPF

I have a UserControl... XAML: <UserControl x:Name="ClientsListControl" ....... > <Grid> <ListBox Margin="10" DisplayMemberPath="Name" Name="profilesListBox" ItemsSource="{Binding ElementName=ClientsListControl, Path=Items}" /> </Grid> </UserControl> Code behind: public partial class ClientsList : UserC...

What is the difference between ListView and GridView in WPF?

I am trying to create a WPF database application. There seems to be a few good components that I can use for showing the data in the database tables. ListView and GridView seems to be popular for this usage. But for a novice, it's hard to see the difference between them. What is the difference between ListView and GridView? What are the...

Prevent ListView from Resizing Window When Adding Items WPF/C#

I have a ListView in WPF that is resizing my entire application window whenever I add items to it. I have the ListView size bound to the grid it is in, which is bound to the window size. So when the user resizes the window, the ListView grows. The problem is that when I add items to the ListView, it automatically stretches to try to fit ...

add label ...on Browser or flashPlayer in C# wpf

Hi, I can't load the controls:FlashPlayer in C# WPF on the computer 64 byte add it's working on computer 32 byte How can I put label or command on Browser or FlashPlayer I cant do FrontToBack or GoFront ... Do you know How can I do Front to back ???? Thanks!! ...

In C# (or in C# with WPF), how would I build a checkbox at run time?

In C# (or in C# with WPF), how would I build a checkbox at run time? I would I be able to query the check box to see if the user clicked on it? In other words, suppose I have a "grid" on which I want to have displayed some checkboxes. But I do not know how many checkboxes to display. I suppose I could (in WPF) fill the grid with check...

Data components in Visual Studio are disabled, how to enable them?

I am trying to make a WPF application with a SQL Server CE database. I am following the tutorial SQL Server 2005 Compact Edition Data Access with the SqlCeResultSet and Visual C#.NET, but in my Visual Studio 2010, all components under the Data-section of the Toolbox are disabled. Why are my Data components disabled? And how can I enab...

Create a secure application with basicHttpBinding

Hello everybody, I am really really tired these day because of facing this problem. I am building a XBAP application (WPF Browser Application) that uses WCF Service. This app requires: Users can login by using their username and password (that store in my database) Users don't need to install any of X509 certificate (*.pfx or *.cert......

Cannot assign data to an object array in WPF with C#

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Shapes; using System.IO; nam...

Feeding Data into ListView from SQLite Database

I have millions of records that need can be searched and then appear in a ListView. Currently, these items are stored in an SQLite internal database. Does anyone have a recommendation on the best method to feed these items into a ListView and have people scroll through them? Speed is critical here. I don't want to do a "SELECT *" off o...