wpf

SQlite & c#, unable to connect database error.

SQLiteConnection conn = new SQLiteConnection("Data Source=/data/bakkal.db3;"); conn.Open(); conn.Close(); I am new at programming so maybe the problem is a very dumb one, sorry for that. I am trying to connect my project with a database which exists in the directory listed above. But the project gives an error at "conn.Open();" line wh...

how can you deploy an XBAP app with WCF connection to Self hosted service using Windows identity for authorization?

I'm having trouble finding coherent information about this deployment option for a client-server application: Client side: partial trust XBAP client windows authentication for single signon Server side: self hosted WCF service running in a windows service performing custom role authorization based on a custom authorization policy ...

Is WPF and MVC same concepts ?

Hello I am new for both concepts. 1) I want to know that MVC and WPF is same concepts but WPF for desktop while other is for WEB ? 2) Will be easy to learn other one If i learn one of them ? ...

Trap keyboard input in a WindowsFormsHost control in WPF

Hi, I have an ActiveX control inside a WinForms user control. My WinForms app loves it! Now, moving over to WPF, I use the user control in a WindowsFormsHost control. Works great..., but I want to treat this control as a single element so the user can neatly hit TAB over the existing WPF controls AND this user control NOT to 'go inside'...

WPF ListView has a one pixel border around the internal layout panel. How do I get rid of it?

I have a ListView that goes something like this: <ListView x:Name="SeriesListView" SnapsToDevicePixels="True" ItemsSource="{Binding Items}" BorderBrush="Transparent" BorderThickness="0" Padding="0" Margin="0" VerticalContentAlignment="Top" Background="Purple" LostFocus="ListView_LostFocus" > <L...

Video chat / conference SDK for .NET that WORKS?!?

After googling and binging for a whole day about this, and even trying some stuff unsuccessfully, I'm giving up, to ask you guys this question - Is there on this planet a viable, downloadable SDK for .NET which one can use, out of the box, to add IP to IP (peer to peer) video conference / chat (or whatever people call it) to one's .NET...

Drag and drop an image in WPF

I'm trying to drag and drop an image from one spot on the canvas to another (should be relatively simple), but can't figure it out. The image which I want to move has the following XAML: <Image Height="28" HorizontalAlignment="Left" Margin="842,332,0,0" Name="cityImage" Stretch="Fill" VerticalAlignment="Top" Width="42" Source="/Settle...

SQLite Used to Populate a ListView in WPF C#

I have an SQLite database with over 100,000 records. I need the data to fill a ListView in my WPF project. I'm using System.Data.SQLite. What's the (best) way to get this setup so it works using virtualization? Also, what's the best method to filter the list view based on key word searches? I'm aiming for maximum speed. ...

ObservableCollection slicing using lambda

I have ObservableCollection<ViewUnit> _myItems field, where ViewUnit implements INotifyPropertyChanged. ViewUnit has Handled : bool property. The main view of WPF application has a ListBox which binds to _myItems. I want a separate view of non-handled items only, that is, to have an IObservableCollection<> depended on existing _myItem...

How to enable anti-aliasing for a polyline drawn with WPF StreamGeometry?

I need to draw a polyline into a DrawingVisual. I'm using StreamGeometry for performance reasons. The problem I have is that I can't figure out how to enable anti-aliasing. I can't find any method or property on StreamGeometry or on DrawingContext for anti-aliasing control. The code below is in IronPython, but it shouldn't matter: geom...

WPF: DataGridComboBoxColumn loses its content when selection changes

Hello, When I click a cell in my DataGridComboBoxColumn the ComboBox gets visible and I can select items. When I have selected an item its visible at the top thats fine. But when the cell aka ComboBox loses its focus because I click something different in the DataGrid then there is no item/text visible anymore in the cell I have previou...

What is the difference between System.Windows.Controls.Control and System.Windows.Forms.Control?

I'm confused, can anyone help me out? Edit My problem is that I have created an ActiveX control in Delphi and I just can't get it to play nicely in WPF land. I have looked at the relevant MSDN pages, and it looks like it SHOULD work, so I may have gone wrong in the way that I have created the ActiveX control in the first place. See ht...

Make scrollviewer not capture control left and control right in WPF.

I have a WPF application where I have defined custom commands that use the key gestures Ctrl-Left and Ctrl-Right. My window has a TextBox and a ScrollViewer and when the TextBox has focus Ctrl-Left and Ctrl-Right move the cursor to the beginning of the next or previous word, which is fine, but on the ScrollViewer it makes the horizontal...

How could i draw a line between a treeview item and a cusom control in WPF.

Hi every body, I am trying to write a new application.it has a source treeview,and a button in another stack panel. i would like to draw a line between selected treeview item and the button i have mentioned. i don't know how could i do it. it would be garteful if anyone can help me. ...

[WPF] Can you bind to a dependency property of a custom behavior?

I created a custom behavior that exposes some custom dependency properties whose values change based on AssociatedObject. I am using these properties for binding in other objects. Conceptually, think of it like this: At runtime, the value of the dep prop doesn't reflect in the binding. Debugging it, I see (certain ide...

Setting TabItem foreground color also sets the TabControl foreground color

I have a TabControl that I have restyled. The TabItem has a trigger that is fired when the TabItem is selected that changes the TabItem text to bold and green. The problem I have is that the text in the contents of the tab is also set to bold and green. I can work around this by setting all of my controls in the tab content to be the co...

How to bind local variable in WPF

I have silverlight usercontrol. This contains Service Entity object. see below public partial class MainPage : UserControl { public ServiceRef.tPage CurrentPage { get; set; } ... } I need to bind CurrentPage.Title to TextBox My xaml is here <TextBox Text="{Binding Path=CurrentPage.Title, RelativeSource={RelativeSource self}}"></T...

[WPF] Get the window from a page

How to get a window from a page , so I've got a page frame in my window : <Frame NavigationUIVisibility="Hidden" Name="frmContent" Source="Page/Page1.xaml" OverridesDefaultStyle="False" Margin="0,0,0,0" /> And trying to access my window from this page this way : private void Page_Loaded(object sender, RoutedEventArgs e) { if ((W...

how to launch other program in WPF like windows form process.start

i used process.start in windows form to launch other program but now i want to use wpf to launch it . i uesd: Process virtualMouse = new Process(); virtual.StartInfo.FileName = "VirtualMouse.exe"; bool result = virtual.Start(); and i getting error: the type or namespace name'Process' could not be found (are you missing a using ...

Saving richtextbox data inside a database along with the formatting

I have a rich text box in one of my applications (WPF). Now I want to store the data of the rich text box along with its formatting (e.g. bold, colored etc.) into a database (SQL Server). Currently I am storing the whole XAML of the text box in a database field. however, I am not sure whether this is the right approach. Looking forward t...