wpf

Please solve my query regarding dot net

Hi, I am experienced in dotnet wpf silverlight.. I am presently trying to attend some technical interviews. Can anyone tell me what and all topics i have to cover to complete my technical round successfully? ...

WPF Data binding to project settings

Hi In my app, i data bind two text boxes to project settings. <Page.Resources><p:Settings x:Key="Settings" /><Page.Resources/> <TextBox Grid.Row="3" Name="textBox1" Text ="{Binding Source={StaticResource Settings}, Path=Default.Number_Of_Versions, Mode=TwoWay}" Grid.Column="1" Height="30" /> In the textbox i see the number of vers...

How to get DataGridColumnHeader from DataGridColumn ?

My code is as follows :::: void mainDataContextObj_CutSelectedColumnEvent(string columnId) { IList<DataGridColumn> columns = dg.Columns; for(int i=2; i<dg.Columns.Count; i++) { DataGridColumnHeader headerObj = dg.Columns[i].Header as DataGridColumnHeader; //This always returns hea...

wpf chart legend

How do I enlarge those rectangles ? I'm using wpf toolkit charts and I've tried to play with the control legend but it didn't helped. ...

ScatterView and ViewBox is not working as expected

I defined the following layout: <Grid Name="RootGrid" Background="{StaticResource WindowBackground}" > <s:ScatterView Name="RootScatter"> <Viewbox> <s:LibraryContainer Name="RootContainer" Grid.Row="0" ViewingMode="Bar"> <s:LibraryContainer.BarView> <s:BarVi...

Collection Binding on CollectionViewSource Source Property

I've a CollectionViewSource as ItemsSource of my DataGrid...on Window.Resources I've this definition: <CollectionViewSource x:Key="ItemsPoolCollectionView" Source="{Binding Path=MyObservableCollection, Mode=OneWay}" /> now, I would do the same definition from code, so I've done this: Dim _cvs as CollectionViewSource = New Coll...

Why is the scalability of the UI important in WPF?

While I love developing user interfaces in WPF and XAML, I've tried to embrace the scalability aspect by also creating my icons as vector images... but it's really hard! I very rarely get the same kind of crispness that I can with raster graphics and it almost always takes me longer to produce the icons. Am I wasting my time? Is there n...

Locbaml /generate gives error "Type reference cannot find public type named '...'"

Hi, I'm using Locbaml to generate localization files in my WPF application. Yesterday, I've upgraded my solutions from VS2008 to VS2010, and since then Locbaml throws an error in two of my assemblies saying "Type reference cannot find public type named 'String'." in one assembly and "Type reference cannot find public type named 'Int3...

Dock a Canvas in its parent

How can I "dock" a canvas in its parent? I have a UserControl that contains a canvas inside. <UserControl x:Class="MyUC" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/20...

Running application containing a SQLCE db causes "Internal error: Cannot open the shared memory region." on windows 7

Hi there, I have just finished developing a wpf application that uses a sql ce db. I am using installshield2010 express to package up the application. I have created a folder (ProgramData) within installshield and created a directoy for my db e.g. c:\ProgramData\Test\Data\MyDb.sdf however when I run the application I get an error Intern...

WPF - Weird scrollbars behavior in TabItem

I have following code: <Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="145" Width="156"> <Window.Resources> <DataTemplate x:Key="tabTemplate"> <ScrollViewer> <StackPanel Orie...

XAML Tool Tip Data Context and Multi Binding

Hi there I have a ListView in my XAML and I am trying to hook up a MultiBinding Converter. <ListView Grid.Column="4" Grid.Row="1" Grid.RowSpan="5" Margin="8,0,8,8" HorizontalAlignment="Stretch" Name="lvDisplayType" ItemsSource="{Binding Path=Types}" SelectedItem="{Binding Path=Current.Opt}" VerticalAlignment="Stretch" ...

Update WPF ProgressBar that is bound to a dependency object running a long process.

I want to bind the value property of a WPF ProgressBar to a dependency property that is updated during a long running process. If the long running process is called from the main thread then this blocks the UI (and hence the ProgressBar) from updating until the process completes - preventing the desired progress through the process being...

Silverlight performance testing

Hello, Can anybody recommend me a tool or an approach to measure the performance of silverlight object inside of Internet Explorer object? An approximate test scenario is Start Timer; Open the page, Wait until the silverlight object raise an event (for ex. OnDisplayed()); Stop Timer; OR Start Timer; Open the page, Wait until the si...

C# WPF grab screenshot with SnippingTool effect

I'm trying to integrate a screenshot grabbing feature in my WPF app and I'd like it to look like snipping tool. So far I've managed accomplish something similar by creating a fullscreen window (with a canvas) with opacity set to 0.5 and dark background. When I click somewhere and start dragging, a white rectangle is drawn, generating an...

How do I prevent subtitles from showing up on my MediaElement?

Hi all. I'm trying to create my own Media Player application using a WPF MediaElement. I know that the MediaElement actually uses Windows Media Player as its source and that's why it also loads the .srt (subtitle) file and shows subtitles below the video. My application is actually supposed to override default subtitle rendering and sho...

Can I create a WPF custom controll that has a "placeholder" item?

Hi all, We have a lot of controls that consist of: A container with rounded borders and a couple of buttons that call save & cancel commands on the view model somthing like this: <Border Background="White" CornerRadius="10" BorderBrush="Black" BorderThickness="1" Opacity="1" Padding="5,5,5,5" VerticalAlignment="Center" HorizontalA...

DataGrid in WPF

Datagrid control is missing in Toolbox. I tried to add it from WPF components, but it is not listing there also. And iam using 3.5 framework ...

WPF Binding individual text boxes to an element in a collection object or array....

I need to bind a textblock.text property to a single element in an observable collection, or array element, and have the text update using the INotifyPropertyChanged or INotifyCollectionChanged, whichever is best. Most examples describe ways to bind listboxes or other list views to entire collections, but my application needs to update ...

Is it possible to create a desktop application using Silverlight?

Hi! I have been using WPF for a while, and I keep on realizing again and again that Microsoft invests its efforst in Silverlight, not in WPF (RIA Services, default theme, controls and more). I thought it might be a good idea to migrate to Silverlight (i.e. creating standalone desktop apps with Silverlight 4.0), the question is whether ...