wpf

How does XAML set readonly CLR properties?

I am trying to create an application bar in code for WinPhone7. The XAML that does it goes like this: <PhoneApplicationPage.ApplicationBar> <shellns:ApplicationBar Visible="True" IsMenuEnabled="True"> <shellns:ApplicationBar.Buttons> <shellns:ApplicationBarIconButton IconUri="/images/appbar.feature.search.rest.pn...

WPF- Is it possible to add an OnVerticalOffsetChanged event to a custom textbox?

Is there any way for me to do this? ...

MVVM pattern: ViewModel updates after Model server roundtrip

I have stateless services and anemic domain objects on server side. Model between server and client is POCO DTO. The client should become MVVM. The model could be graph of about 100 instances of 20 different classes. The client editor contains diverse tab-pages all of them live-connected to model/viewmodel. My problem is how to propaga...

How to explicitly select the row in ListView in WPF?

I have a ListView in which one of the column contains combo box. I have binded the selectedItem of a Listview, so that I get the current object (selected row ) in the listview. When I do any operation in a combo box like selection change then the listview row ( in which that combo box belongs) is not selected be default and hence my ...

Batch scripting for directories or better method

Hi Everyone, Looking at creating a simple batch file for my app. My app needs some directories to be in place as it runs. The first method I thought was just make a batch script: @ECHO OFF IF NOT EXIST C:\App GOTO :CREATE ELSE GOTO :DONTCREATE :CREATE MKDIR C:\App\Code ECHO DIRECTORY CREATED :DONTCREATE ECHO IT WAS ALREADY THERE 1...

How do I add TabItems to a TabControl from another TabControl?

I want to dynamically copy or move TabItems from one TabControl to another TabControl. Unfortunately, I get the following exception: {"Element already has a logical parent. It must be detached from the old parent before it is attached to a new one."} Trying to delete it from the old TabControl before adding it to the new throws off my ...

XamlParseException due to DatePicker from WPFToolKit

Hello everyone, Error : UnhandledException: System.Windows.Markup.XamlParseException: '/WPFToolkit;component/DataGrid/Themes/Luna.NormalColor.xaml' value cannot be assigned to property 'Source' of object 'System.Windows.ResourceDictionary'. Could not load type 'System.Windows.Controls.Primitives.MultiSelector' from assembly 'Presenta...

Dropdown menus not showing when i use my wpf application via Remote connections

When i connect to my machine using remote desktop the dropdown menus and comboboxes i used in my wpf application is not showing up. And after closing the session when i comes back to my development machine where actually my application runs there also the same issue happens after the remote desktop session. Tried by changing resolution a...

WPF performance : Converters vs. Triggers

hi there, i´m currently facing a problem where i have to set properties on a bunch of framework elements depending on some other properties. i wonder how triggers and converters compare when it comes to performance. Especially MultiTriggers and IMultiValueConverters. Is there any difference? google wasn't helpful so i thought maybe so...

Need solution for Text trimming Problem

Hi Guys, We are facing problem regarding Text trimming in TextBlock. We have a Text "My very long label goes here" and we have to show it in following format: [...g label goes here] i.e right aligned and text should be trimmed from left (character ellipsis at left side) We have used FlowDirection of TextBlock, ellipsis is correctly ...

XBAP refresh event

Hi. I am developing an xbap application and have run into a problem with users refreshing the application using F5, which results in an immediate application crash. The workaround is to use the browsers refresh button. This reloads the application as expected. What exactly happens when the user presses F5 in an xbap? Is there any way...

using style in WPF

In my application I use ShinyBlue.xaml resourse Dictionary which has this code for GroupBox control: <Style TargetType="{x:Type GroupBox}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type GroupBox}"> <Grid SnapsToDevicePixels="true"> <Grid....

Loading XAML To Grid Control

How can I load XAML which is from the DataBase into the grid control in C#, How can I load that xaml into Grid Control ? ...

Google Web Toolkit or Microsoft Technology (Silverlight, ASP.NET)

We have a large code base in MFC and VB. A few applications are in .NET. All these applications interoperate with each other on the user's machine and also connect with Unix servers via sockets. Recently we have started discussing a re-write of our applications and possibility of moving a lot of these desktop applications to web (they ...

[C#/WPF] Combo box Item source = ObservableCollection & I need a '-None-' dummy entry at the top

I have a combo box using an observable collection as a datasource and I want a "dummy" value of "None" as the first item in the box as it controls filters against other data sources. Other databound objects also use the same observable collection so adding a "None" value directly to the datasource is not possible as I dont want, for exa...

How to configure WCF Service with Https WindowsAuthentication?

I am trying to figure it out how to set configurations on my service and Silverlight client App to work on Secure Windows Authentication. I have my service configured like this: <binding name="currentCustomBinding"> <binaryMessageEncoding /> <httpsTransport authenticationScheme="Ntlm" bypassProxyOnLocal="true" /> ...

Put DrawingGroup on a Canvas?

Hello, I have a DrawingGroup and I want to put it on a Canvas, but because DrawingGroup is no UIElement, this is not possible. Whats the best way to do this? And from which class could I derive, so that I could do something like canvas1.Children.Add(new myDrawingGroup()); (Meaning I want to add my DrawingGroup as one element on the c...

How to Clear an image control in WPF (C#)

I have an image control with a source image located in my c drive. I get a message that the image is being used by another process whenever I try to delete the original image to change it with another one dynamically. How do I release the image from the image control to be able to delete it. I tried this variants: string path = ((Bitma...

How to highlight search results in WPF treeview?

I am developing an app ( A database file system ). I am using WPF treeview in its GUI.The treeview items are directly extracted from my apps database. I want to search and highlight the treeview items as I type. To understand the question better, consider the keyword search results shown in browsers. How do I achieve that in my con...

WPF Grid : GridSplitter event

Hi, I need to put a event while resizing grid columns using a gridsplitter. I tried using 'sizeChanged' event on the columns getting affected. But its not working Please tell me how to do that Thanks ...