wpf

create rectangles at runtime

I am trying to create rectangles and the number of rectangles is depend on data passed from database. for example, if number = 5, the program will generate 5 rectangles. Also, these rectangles must be able to follow my rectangle property settings, like height, width,color...put them in one line at the end. is there a way to do that? I ...

What would cause a WPF utilizing WCF fail to function when published?

I have a WPF app that utilizes WCF to send data to a server. Works great in my development environment, but when I publish it via Click Once it will not work, the send times out. The kicker is if I navigate to the sub folder that Click Once installs to it runs fine. The only place that it fails is when it is spawned from the Click Onc...

populate listview dynamically

If i bind a data table to WPF Toolkit-data-grid.....no need to specify the column names there...it will automatically take that from the datable. But if I am binding a list-view to an observable collection...I have to specify the column header names for each column one by one..in xaml file. So if I have a list of column names ->List<...

Xceed grid obtain the drag item

Hi, I have been implementing the drag and drop on the xceed grid. Code is below: private void Grid_MouseMove(object sender, MouseEventArgs e) { Xceed.Wpf.DataGrid.DataGridControl grid = sender as Xceed.Wpf.DataGrid.DataGridControl; object target = GetItemAtLocation(sender, e.GetPosition(...

ColorAnimation Gradient On WPF

<LinearGradientBrush x:Key="BrushPrincipalBorderBlue" EndPoint="1.3,1" StartPoint="-0.2,0"> <GradientStop Color="#FF030637" Offset="1"/> <GradientStop Color="#FF0E0F31" Offset="0.166"/> <GradientStop Color="#FF2E2F70" Offset="0.629"/> <GradientStop Color="#FF030637" Offset="0.63"/> </LinearGradientB...

WPF toolkit Accordion control appears to not use UI Virtualizing. Is there a way to get it to use UI Virtualizing?

I am using the WPFToolkit Accordion control with the items in the accordion defined to be a TreeView. For context, here is the relevant part of the XAML: <ScrollViewer VerticalScrollBarVisibility="Auto" CanContentScroll="True"> <layoutToolkit:Accordion DockPanel.Dock="Bottom" HorizontalAlignment="Stretch" ...

how can i tell a wpf window overlays another one

in wpf ,how can i tell a wpf window overlays anther one? Image there are two windows, they are both not active, one should overlay the other one, how can i tell that in my app ...

How to get Selected items in WPF CheckBox ListBox

Am Using the checkbox in listbox items, how to get the selected checkboxes from the list <ListBox ItemsSource="{Binding NameList}" HorizontalAlignment="Left" Margin="16,68,0,12" Name="listBox1" Width="156" IsEnabled="True" SelectionMode="Multiple" Focusable="True" IsHitTestVisible="True" IsTextSearchEnabled="False" FontSize="12" Paddin...

XBAP Startup Performance Improvements

I have an XBAP application which is approximately 1.3MB in size. I have tried to get the size of the application down to as small as possible but have dependencies on the WPF Toolkit amongst other things and am limited there. Currently I am experiencing slow start ups in the following areas: Initial Download (probably application siz...

How do I get a scrollbar in a scrollviewer to focus the scrollviewer when clicked?

Currently with a scrollviewer, clicking the scroll bar contained in it to pan the content around it will not focus the viewer (or anything for that matter). I wish to have it so when you scroll by dragging the scroll, or even clicking the scrollbar will focus the parent (scroll viewer). I achieved this somewhat by attaching a ScrollCha...

Is it possible to implement WPF in already developed C# Windows form application Without Changing Existing code?

i am working with C# windows form application i developed project in that.i like to make project design into more stylish and modern.is it possible to do like this by using WPF,if yes i like to apply WPF code without change Existing code and design,Is it possible to do like this. For Example i am putting one button name OK if i click OK...

How to select icon for a WPF to be the icon of the application?

I have set the icon to use for my application but my form still having the default icon on it. How can I select its icon to be the one set for the application? Please help ...

Disable context menu on some DatGrid cells WPF

I have defined a datagrid like this :: <cc:PEDataGrid AutoGenerateColumns="False" ItemsSource="{Binding Rows}" Width="Auto" PreviewMouseRightButtonDown="PEGrid_PreviewMouseRightButtonDown" Loaded="CommonPEGrid_Loaded"> <wpfkit:DataGrid.Contex...

WPF: Popup always floats on top. How do i correct that?

Hi The popup that gets opened in my app always stays on top. It goes away when i minimize the app. But otherwise if the app opens a new window or if i switch to another program without minimizing the app, the popup stays on top. How do i hide the popup when the app loses focus? Thanks ...

WPF Wait for User Input

Hi Everyone, I'm adding user authorization into my WPF application and I'm having a problem with the login screen. I have the login screen showing but the application continues to process the current action. IE. Show the main window 1. check if user is allowed to view the main window 2. User is not allowed 3. Show login screen 4. L...

Drag and Drop file transfer in WPF. How to get file name of the dropped content in a window.

I'm creating a local file transfer app. I would like the user to drag-drop an item into the file transfer application to initiate the file transfer just like skype or other messengers. While dropping an item. The drop event was triggered. But, I don't know where to get the details of the item such as Location, Size etc., eg., If I drop ...

Coloring of ListBox

Is it possible to get this row coloring in the WPF Listbox? White LightGray Gray White LightGray etc.? Thanks ...

When are reference-type attached properties (DependencyProperty) released?

Say I want to make an attached property that attaches a list of object references to a view instance (a DependencyObject/FrameworkElement)... When does it release all of those references? Will it call Dispose on attached property values if they implement it? ...

WPF - Doesn't find all usercontrols in other assembly in XAML

I have this other assembly which has a folder with 10 UserControls and I reference the assembly in XAML so I can use them. xmlns:usercontrols="clr-namespace:Company.Project.OtherAssembly.UserControls;assembly=Company.Project.OtherAssembly" However, when I try to use the UserControls with <usercontrols:someUserControl /> it only finds ...

Binding to external XML doesn't work, but adding XML using XData makes it work.

Here is the code for App.xaml: <!-- <XmlDataProvider x:Key="BookmarkData" Source="testData.xml" XPath="/Favourites"/>--> <XmlDataProvider x:Key="BookmarkData" XPath="/Favorites"> <x:XData> <Favorites> <Bookmark> <Title>Google</Title> <URL>http://www.google.com&lt;/URL&gt; ...