250 Topics

Member Avatar for
Member Avatar for Phillip_8

Hi guys im trying to do a Login system in Wpf with Visual Studio I got the code and DB working fine with Windows Forms in Visual Studio I have changed the code 3 times and they all work on Windows forms but not with Wpf Forms. Below is the …

Member Avatar for Santanu.Das
0
152
Member Avatar for sanjay.vaniya
Member Avatar for rproffitt
0
227
Member Avatar for sanjay.vaniya

System.Windows.Markup.XamlParseException HResult=0x80131501 Message='Add value to collection of type 'System.Windows.Controls.UIElementCollection' threw an exception.' Line number '31' and line position '101'. Source=PresentationFramework StackTrace: at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri) at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri) at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, …

Member Avatar for Dani
0
675
Member Avatar for sanjay.vaniya

<Grid> < Button Content="Add" HorizontalAlignment="Left" Margin="58,142,0,0" VerticalAlignment="Top" Width="75" Click="Button_Click"/> <TextBox HorizontalAlignment="Left" Height="23" Margin="190,50,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="120" Name="t1" Text=" "/> <TextBox HorizontalAlignment="Left" Height="23" Margin="190,94,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="120" Name="t2"/> <TextBox HorizontalAlignment="Left" Height="23" Margin="190,180,0,0" TextWrapping="Wrap" Text=" " VerticalAlignment="Top" Width="120" Name="t3"/> <Button Content="Sub" HorizontalAlignment="Left" Margin="164,142,0,0" VerticalAlignment="Top" Width="75" Click="Button_Click_1"/> <Button Content="Mul" HorizontalAlignment="Left" Margin="273,142,0,0" VerticalAlignment="Top" Width="75" …

-1
213
Member Avatar for Jayme65

Hi, Could you please help me figure out how I could bind "SelectedItems" of a listbox? Here I have a 'listbox_2' that contains a list of fruits and vegetables ;) There's another 'listbox_1' that contains groups of fruits and vegetables (under a list<of string> format...maybe is it my first error? …

0
239
Member Avatar for ddanbe

Windows 10 has a nice date and time display in his taskbar, it is becoming more difficult for me to see , unless I open it. Becoming older and older my eyes are not that ‘fresh’ as they used to be, so I decided to make a bigger time display …

Member Avatar for ddanbe
2
497
Member Avatar for ddanbe

Yes, WPF. The learning curve is steep, but what amazing things you can do with it! Look at this hexagon window for instance. Serves no purpose in a business environment I guess, but in a gaming situation it could work. For me, it was just fun to get this up …

Member Avatar for deceptikon
0
969
Member Avatar for ddanbe

In a XAML file you can add a control like a Button and start to edit its attributes like `<Button Width="200" ..`. When you type in Width you get something like `Width="|"` and is rather nice. After typing 200, you end up with `Width="200|"` Does anyone knows a way to …

Member Avatar for ddanbe
0
590
Member Avatar for KushMishra

Hi Everyone, I started creating a new WPF project wherein, I have just added a style to all the elements of type "Window" and "Grid" but none of these are working (rather a wierd black box is apprearing - Screenshot attached). **NOTE:** I do not want to use "x:Key" for …

Member Avatar for rproffitt
0
2K
Member Avatar for Jan_8

Dear, I'm really new in c# WPF and I need to develop a program that read a directory with sub-directories and files. For each directory I need to create a form and for each file a button. the directory structure is: c:\dir1 c:\dir2\subdir1\file.pdf c:\dir3\subdir1\file1.pdf c:\dir3\subdir1\file2.pdf C:\dir3\subdir2\file21.pdf If it's possible, how …

Member Avatar for Reverend Jim
0
174
Member Avatar for Gopal_4

Hello Friends, Thanks for helping me for my last queries. Right now I am facing problem on how to implement Auto Update function for my WPF Desktop Application. team decided to use NetSparkle rather than ClickOnce. Any One have Information and Detail about how to use NetSparkle. Please give me …

Member Avatar for rproffitt
0
142
Member Avatar for KushMishra

Hi, I am developing a WPF application in which I need to call `MouseLeftButtonDown` event in a single `DataGridTextColumn`. For that I wrote some xaml code as :- <DataGridTextColumn x:Name="myAge" Header="Age" Binding="{Binding Age, Mode=TwoWay}" IsReadOnly="True" Width="*"> <DataGridTextColumn.CellStyle> <Style TargetType="DataGridCell"> <EventSetter Event="MouseLeftButtonDown" Handler="{Binding MyAgeCommand}" /> </Style> </DataGridTextColumn.CellStyle> </DataGridTextColumn> But I am …

Member Avatar for Alex_45
0
8K
Member Avatar for emilyjackson

Can someone show me how to use objects of arbitrary classes for declarative field joining. I use Dapfor WPF Grid. I am looking for anyone with an idea of Gridcontrol to assist me.

Member Avatar for marrylugard
0
101
Member Avatar for Doogledude123

I have this method that is used to set the columns and data in the listview based on a string. I'm not sure how to add the columns I need programactically. I need to use different data types though. private void populateLeaderBoardList() { string btnContent = (string)btn_exportLeaderBoard.Content; if (btnContent.Contains("Totals")) { …

0
194
Member Avatar for KushMishra

Hi, I have a WPF Grid with multiple controls like TextBox, ComboBox, CheckBox etc. and their properties like Text, SelectedItem, IsChecked etc. are present inside the view model bound to the view perfectly. I want to copy the values of all the controls to the Clipboard (may be) and want …

Member Avatar for Santanu.Das
0
2K
Member Avatar for vuyiswamb

Good Day all i am using Navigation service as depicted below <Frame x:Name="_home" NavigationUIVisibility="Hidden" HorizontalAlignment="Stretch" Width="2749" Margin="0,12,0,0" /> and i navigate to the Page like this (Application.Current.MainWindow.FindName("_home") as Frame).Source = new Uri("/F1.xaml", UriKind.Relative); which work fine. now in the Navigated page, lets just say a page shown in the Frame,there …

Member Avatar for Santanu.Das
0
204
Member Avatar for zachattack05

Forgive me, but I've only really used WinForms in the past, and MVVM and WPF are new to me. For those who use MVVM with WPF, do you actually make separate directories (namespaces) for your Models, Views and ViewModels files or is it more of an abstract idea? I fundamentally …

Member Avatar for zachattack05
0
335
Member Avatar for zachattack05

I am starting a new application for our business to help maintain our client information, so it is going to be a very data driven application. I'm curious, from the standpoint of those who have used both and who may have constructive suggestions on the future direction of development, should …

Member Avatar for zachattack05
0
228
Member Avatar for you207

Hi I'm try to change the background of the matched by a Regex text. Example: input: aaa aaa aaa //double white spaces in between output: aaa aaa aaa //change the background of all matched white spaces to red But it's coloring the wrong text. I have tried and searched google …

Member Avatar for JOSheaIV
0
967
Member Avatar for James_43

Hi there, I have two WPF windows. The first (Window1) has a timer that moves an item down a list, then passes the new current selection to a global variable I defined in App.xaml.cs Window 2 then has another timer that is set to .1 of a second after the …

Member Avatar for James_43
0
287
Member Avatar for James_43

Hi there, I've created a new C# WPF project. The first MainWindow displays a listbox of images within a folder and displays them inside a larger image object. I am trying to get Window1 to open a fullscreen version of the selected image, that changes depending on what image is …

Member Avatar for JOSheaIV
0
338
Member Avatar for ddanbe

After reading this excellent [code snippet](https://www.daniweb.com/software-development/csharp/code/492766/display-excel-data-in-a-datagridview) by djjeavons, and just trying to learn WPF, I decided: "Well, let's translate that to WPF!". It was a bit harder than I thought, but a great learning experience! Her's how my screen in action looks: ![WPFscreen.png](/attachments/small/1/ac05d33ccd8a190d0576fa063e54749f.png "align-left") Things that changed compared to the …

Member Avatar for ddanbe
1
572
Member Avatar for Hazem_3

Hello I want to make a customizable lock screen app. Im trying to make it such that you can access your computer in different ways (like using the accelerometer). I've already managed to use the accelerometer in the WPF app (through a method that allows me to use winRT APIs). …

0
235
Member Avatar for Mike Askew

Howdy So I have a set of data coming back from a process with five different pieces of data per entry in the set. Are there any fancy ways you can generate some kind of look-a-like report on the fly in WCF, else what would be the best way to …

0
249
Member Avatar for goody11

I am just starting a new WPF project using MVVM as a general guideline. The application will have a ribbon; when you switch between tabs, there will be different buttons that spawn dockable windows in the content pane below the ribbon. This part is done. Now, each of those windows …

Member Avatar for JOSheaIV
0
594
Member Avatar for Stanny_1

to convert a popular command-line **python** application from python to a C# WPF application. The application in question is http://rg3.github.io/youtube-dl/ I've already done some analyses but am stuck on some python parts so I would like to ask if any enthousiasts would help me out here. (for example can't get …

Member Avatar for AleMonteiro
0
182
Member Avatar for singularity~

I am having a issue with data binding from a instantiated class in project A to Project B. The data binding "seems" to be working correctly; however, I am definitely getting a different instantiation of ClassA. This is the ClassA - which is a class in a different Project. ClassA …

0
118
Member Avatar for maxpaine69

Hi all, I have a problem i have binding validation in WPF, aplication, but now because some rules some textboxes get disambled, and the validation shows same way, is there a way to disamble the validation when they are disabled and turn on when enabled? Best Regards

Member Avatar for clairestreb
0
191
Member Avatar for Giridhaar

I have been following this tutorial (http://www.codeproject.com/Articles/18379/WPF-Tutorial-Part-Writing-a-custom-animation-cla) to try and adjust the Width of one of my Grids upon a Button click. <Grid Grid.Row="2"> <Grid.ColumnDefinitions> <ColumnDefinition Name="leftGrid" Width="7*"/> <ColumnDefinition Name="rightGrid" Width="3*"/> </Grid.ColumnDefinitions> <i:Interaction.Triggers> <ei:PropertyChangedTrigger Binding="{Binding State}"> <ei:GoToStateAction StateName="{Binding State}" /> </ei:PropertyChangedTrigger> </i:Interaction.Triggers> <VisualStateManager.VisualStateGroups > <VisualStateGroup x:Name="VisualStateGroup"> <VisualState x:Name="Expanded"> <Storyboard> <local:GridLengthAnimation …

0
96
Member Avatar for Stacy_1

I have made a WPF application, it has a button to move some files attached to the column cells from one column to another column. The moment when i press button it shows a nice animation and moves all files to the next column cells. But my real problem is …

Member Avatar for harshchandra
0
213
Member Avatar for IsaacMessi10

Hi, I'm getting the following error: NullReferenceExceptionWasUnhandled on `if (messageUserList[i].Contains("_0"))`. I can't seem to find where the data is null. I've tried debugging using breakpoint yet no luck. Basically what I intend to do is get the text from a particular textbox `txtSendMsg` and write it to `messageList` at position …

Member Avatar for IsaacMessi10
0
147
Member Avatar for BibhutiAlmighty

Hello, I have been programming in windows form application and i'm quite familiar with it. Now i want to code it. I tried but it seem a bit different than winForm appplication < Maybe because of XAML >. Can anyone suggest me some video tutorials, books or anything to get …

Member Avatar for Santanu.Das
0
110
Member Avatar for burhanahmed92

I have a multicolumn listview. There are three button Add, delete and Updata. List is working fine, it add, delete and update list data. But i want to save every row inside listview when i click save button. Bellow is my XAML. <TextBox Canvas.Left="12" Canvas.Top="12" Height="23" Name="textBox1" Width="120" TextChanged="textBox1_TextChanged" KeyDown="textBox1_KeyDown" …

0
254
Member Avatar for burhanahmed92

I worked on ASP.NET and i use sqldatasource control to add binding in my DataGrid. But now i am making app in WPF C# and there is no sqldatasource in Toolbar. I am using VS2013. I searched online and most of the sites tell to add connection manually in c# …

Member Avatar for gerhard_1
0
175
Member Avatar for maxpaine69

Hi all, I have a data grid that need to be with the same width of the windows that it is showing, but for some reason i can matain that width. Can anybody give a hand here. Best Regards

Member Avatar for maxpaine69
0
242
Member Avatar for KushMishra

Hello All, I am developing an application in WPF in which I need to set a generic input bindings for TAB key for every field present in the view. I somehow managed to create a common method but now I wnat to retrieve on which field the TAB key has …

Member Avatar for KushMishra
0
467
Member Avatar for KushMishra

Hi All, Just wanted to know on how to dynamically set the focus on a TabItem of a TabControl in WPF at runtime using bindings etc. Thanks

Member Avatar for KushMishra
0
108
Member Avatar for PerplexedB

I may be very wrong, but in the web world, just installing Bootstrap gives you some basic control over how you controls look. Is there something similar for WPF? I don't seem to find anything, I have a very basic little wpf application with a pageframe, buttons, textblocks and textboxes. …

Member Avatar for PerplexedB
0
272
Member Avatar for game4tress

I've made a rectangle with another 3D point inside. The rectangle is textured with an image. Now, I need to move the point that is inside the rectangle to another 3D position. Does anyone knows how this is possible? The only way I found, that is no good for what …

0
269
Member Avatar for PerplexedB

I have this control on my (wpf)form Status <TextBlock x:Name="Status" HorizontalAlignment="Left" Margin="138,0,0,0" TextWrapping="Wrap" Text="TextBlock" VerticalAlignment="Top" Grid.ColumnSpan="3" Height="67" Width="577" Grid.Row="1" IsHyphenationEnabled="True" UseLayoutRounding="False"/> It seems that just setting Status.Text=someValue from within a click event does not refresh until the event is completed. How can this be done (in C#) if one wants …

Member Avatar for ddanbe
0
158
Member Avatar for Ahmed_51

I've created a Mortgage Calculator via WPF on visual studio 2012. The design looks like this: Enter Loan amount: TextBox here Enter Loan Duration: 15 years(Radio Button) 30 years(Radio Button) Other(Radio Button) with TextBox Select Interest Rate: ComboBox here Button here to calculate The issue i'm having trouble with coding …

Member Avatar for tinstaafl
0
561
Member Avatar for KushMishra

Hello All, I have one webbrowser control and I took a dependency source property from the Internet and binded the same to my string Url. I took this dependency property because .Net doesn't lets you bind the Source property to a string datatype and only Uri datatype. Now I am …

Member Avatar for usamaali
0
1K
Member Avatar for KushMishra

Hi All, I am facing some issues when writing a xaml and my code goes as follows :- <Grid> <Grid.Resources> <!-- Shared Storyboard across the system --> <!-- This storyboard will make the image (button) grow to double its size in 0.2 seconds --> <Storyboard x:Key="expandStoryboard"> <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" To="2.5" Duration="0:0:0.2" …

0
301
Member Avatar for Sevyt

I hope the title is somewhat clear. In windows forms this is pretty straight forward. But for whatever reason in WPF its not the case. I am trying to change the opactiy of 2 labels. Both labels are on seperate windows. Window1 has a button to change opacity of a …

Member Avatar for Sevyt
0
264
Member Avatar for KushMishra

Hi All, I have got one scenario here in which I need to bind a DataGrid to a collection (array, ObservableCollection etc.). My Collection name is "WarningList" and the code is as follows :- **ViewModel :-** WarningList = {({result.WarningMsgCode, result.WarningColor})} **xaml :-** <data:DataGrid x:Name="gridSystemWarnings" Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="3" Grid.RowSpan="2" DataContext="{Binding}" IsReadOnly="True" …

Member Avatar for KushMishra
0
286
Member Avatar for Sevyt

I think i went somewhat over my head with a little tool i wanted to make. The idea was to bind certain keys(users choice) to countdown timers and progressbars. But since the keys are never the same i have to save the chosen key for the selected progressbar. So when …

Member Avatar for Sevyt
0
217
Member Avatar for Member #837239

How to display a image on wpf form which string of path are stored on sql server My sql sever is Emp -------- ID int Name nvarchar Surname nvarchar Imagepath varchar(1000)

Member Avatar for Fenrir()
0
90
Member Avatar for Member #837239

Anyone help me to create one form with C# WPF which use LINQ TO SQL with SQL Server. WPF -------------------- Form has 2 textbox and 1 image in WPF txtFirstName txtLastName Image SQL Server Database -------------------- tblEmp EmpID - int Firstname - nvarchar(10) Lastname - nvarchar(10) Image - image, varcharmax …

Member Avatar for Ketsuekiame
0
205
Member Avatar for catpoints

Hi. I am trying to perform a TranslateTransform on an Image using this code: double to; int increment = 2; TranslateTransform tt = new TranslateTransform(); background.RenderTransform = tt; to = Canvas.GetTop(background) + increment; DoubleAnimation da = new DoubleAnimation(to, TimeSpan.FromSeconds(0)); Canvas.SetTop(background, to); tt.BeginAnimation(TranslateTransform.YProperty, da); This works when the Image exists in …

Member Avatar for catpoints
0
471
Member Avatar for rohit b k

Hello everyone, In my wpf application i have user conrtols like button,rectangle,image etc.. in one side of the window(whole window is divided into 2 canvas panels) i need to implement the functionality where, if i drag any user control and drop it in other area of the window, a new …

Member Avatar for MarkAMalo
0
295

The End.