wpf

WPF Application with Database.

Hi, i would like to or need to use a database for my wpf project. It has to store "person" "team" "goals" and maybe 2 more things, nothing very big. Ive already used (worked) with databases in java / php (postgresql), but is there maybe an "easier" way to store the things.. i mean if the db is going to be big than i could use (postgre or...

Dynamcally resizing an open Accordion

I have an Accordion and the height of its content can be dynamically resized. I would like to see the Accordion dynamically respond to the child item's height, but I'm having trouble doing this. <lt:Accordion Name="MyAccordion" SelectionMode="ZeroOrOne" HorizontalAlignment="Stretch"> <lt:A...

How to draw connecting lines between two controls on a grid WPF

Hi, I am creating controls (say button) on a grid. I want to create a connecting line between controls. Say you you do mousedown on one button and release mouse over another button. This should draw a line between these two buttons. Can some one help me or give me some ideas on how to do this? Thanks in advance! ...

CommandBinding broken in inner Custom Control when nesting two Custom Controls of the same type.

I've done a Custom Control in form of a GroupBox but with an extra header which purpose is to hold a button or a stackpanel with buttons at the other side. I've added the a Dependency Property to hold the extra header and I've connected the customized template. Everything works fine until I put one of these controls in another one. Now...

WPF integrate Windows live authentication for Microsoft health vault

Hi all, I'm just wondering if there's any way for WPF application integrated with windows live ID? and it's actually for windows health vault [www.healthvault.com] so health vault is using windows live id or open id to login into their system. and what i gonna do is, creating wpf application (instead of web application) for health vaul...

How can I select multiple text segments in a WPF textbox?

Is it possible to select multiple parts of text within a WPF textbox? For instance, for a textbox that contains the string THIS IS A TEST, I want to be able to highlight THIS, then hold Ctrl and highlight TEST without unselecting THIS. For a visual clue about what I'm aiming at, see this article about the feature in Firefox. If by defa...

WPF cascaded combo

Hi, I am using LINQ to SQL and MVVM pattern in my application where i am retrieving my data by the following query: internal ObservableCollection<INVCategory> GetCategoryList() { DataLoadOptions dataLoadOptions = new DataLoadOptions(); dataLoadOptions.LoadWith<INVCategory>(t => t.INVSubCategories); this.Context.LoadOption...

Can <Setter.Value> have multiple grids inside it

Hi, I want to define the background for my application in App.XAML. The background was previously defined in another xaml page,which have multiple Grids inside it like following: <Grid x:Key="GridGeneric" d:LayoutOverrides="Width, Height"> <Grid.Background> <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> ...

Storyboard as timer in WPF

Hi, I'm trying to do smooth animation in procedural code. For this (in Silverlight at least), it's recommended to use the Storyboard timer rather than a DispatcherTimer. So I use something like this: Storyboard _LoopTimer = new Storyboard(); public void StartAnimation() { _LoopTimer.Duration = TimeSpan.FromMilliseco...

WPF: Buidling my own paging itemlist....;)?

Hello, for reasons based on storabiligty I have the following objects in a XAML graph: A WorkArea, Containing WorkSheets, Containing WorkItems WorkArea, workSheets are ItemsControl instances. To start: The reason that I am not using standard elements here is that mine are going to get loaded / saved - they represent a business cont...

wpf usercontrol

Dear All, I am using WPF UserControl and I have a grid so I want to generate a click event but it will not work so now what can I do. thanks.. <Border x:Name="frontWrapperWealthBudget" Width="260" Height="150" VerticalAlignment="Top" HorizontalAlignment="Center"> <Border x:Name="frontHostWealthBudget" Width=...

Listbox of comboboxes and binding them WPF

Hello, I have a situation where i have a listbox of comboboxes , mainly it binds to a bridge entity so the object contains foreign keys . What i need to do is that i need to bind the display of the combos to the respective entities and their value members to the foreign key values in the bridge entity that i bind the listbox to. the co...

ADO Entity Framework 4 to WPF Datagrid. DatagridComboBox nightmare.

The WPF datagrid -seems- like it's going to work, but the combobox implementation does not work straight from the designer. So I'm left wandering around in the XAML randomly changing things trying to get it to work. The problems are numerous. I want to display a foreign key relationship (with drop down) instead of a bunch of numbers fo...

Clearing forward entries in NavigationService

I have a small sample application hosted in WPF NavigationWindow. It has three pages (A, B, C) and three buttons are available to the user: Back and Forward on Navigation Window and Next on the first page. The first page A contains two radio buttons. Depending which button has been selected by the user Next button will navigate to page...

How can I design a curve editor that works well with the WPF model?

I have a data model that represents segments of a curve that looks like this: The fields are x and y coordinates of the anchor points (red), and a slope value represented by the control points (green). For the curve to be editable by the user, I'm thinking of using Thumb objects for both anchor and control points. Since I also would ...

How to show scrollbars inside item of ListView

Hi, I have problem with displaing scrollbars around item in ListView. <ListView ItemsSource="{Binding Path=ContentCollection}" SelectedValue="{Binding Current}" VerticalContentAlignment="Top"> <ListView.ItemsPanel> <ItemsPanelTemplate> <DockPanel /> </ItemsPanelTemplate> </Li...

Wpf binding with nested properties

ViewModel I have a property of type Member called KeyMember. The 'Member' type has an ObservableCollection called Addresses. The Address is composed of two strings - street and postcode . View I have a ListBox whose item source need to be set to ViewModels's KeyMember property and it should display the Street of all the Past Addresses...

WPF Application - Role Management Recommendations

I have a WPF application with a WCF service layer and a SQL database. I now want to restrict elements of the application so that certain functions are only available to those users with a particular role. For example, you will only be able to navigate to the settings screen if you are an administrator. I would like a user to be a member...

Setting WPF control background image using styles?

Hi, I have a set of buttons inside a stack panel. I want them all to have a background image. How can i do it using styles? since i don't want to set manually the Background image for each button. Here is a code snippet: <StackPanel Orientation="Horizontal" Height="100px" VerticalAlignment="Top"> <StackPanel.Resources> ...

Refreshing Read-Only (Chained) Property in MVVM

I'm thinking this should be easy, but I can't seem to figure this out. Take these properties from an example ViewModel (ObservableViewModel implements INotifyPropertyChanged): class NameViewModel : ObservableViewModel { Boolean mShowFullName = false; string mFirstName = "Wonko"; string mLastName = "DeSane"; private rea...