15,911,141 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by prapaug (Top 36 by date)
prapaug
1-Oct-13 3:41am
View
The question is that,i have two concentric circls.The space inbetween those circles if filled with an image.I want to extract that portion from the bitmapsource image.Pls ask for clarification if needed.
prapaug
6-Aug-13 6:17am
View
Its working now.Thanx for your answer.
prapaug
6-Aug-13 6:12am
View
Deleted
So i cannot access a table in a data table array using index..right?
prapaug
6-Aug-13 6:11am
View
Deleted
so i cannot use access a data table in a data table array using index ..Right?
prapaug
31-Jul-13 8:26am
View
i have a gird with me and i have a user control too.i want to add this user control to the grid in main window.i hope you got my question
prapaug
31-Jul-13 7:34am
View
so what should i do?can you please modify my code.
prapaug
31-Jul-13 6:02am
View
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
// private UserControl currentview;
private UserControl currentview
{
get
{
return this.currentview;
}
set
{
if (this.currentview == value)
{
return;
}
this.currentview = value;
// RaisePropertyChanged("currentview");
}
}
UserControl1 uc1 = new UserControl1();
UserControl2 uc2 = new UserControl2();
UserControl3 uc3 = new UserControl3();
UserControl4 uc4 = new UserControl4();
private void button1_Click(object sender, RoutedEventArgs e)
{
uc1.Visible=true;
uc2.Visible = false;
uc3.Visible = false;
uc4.Visible = false;
}
private void button2_Click(object sender, RoutedEventArgs e)
{
uc2.Visible=true;
}
private void button3_Click(object sender, RoutedEventArgs e)
{
uc3.Visible = true; ;
}
private void button4_Click(object sender, RoutedEventArgs e)
{
uc4.Visible=true;
}
i have done this..but its not working
prapaug
31-Jul-13 5:53am
View
Can you please tell me what should i do inside the button click event?
prapaug
25-Jul-13 5:24am
View
how can i bind my list to datagrid view..
please give me the code.
prapaug
25-Jul-13 4:24am
View
its not working...i wanna bind the entire list to datagrid first and then display contents according to my selection.
prapaug
24-Jul-13 5:21am
View
i'm stucked with this task.please help me.
prapaug
24-Jul-13 5:10am
View
i have already added a listview to main window.Now what?
prapaug
24-Jul-13 3:23am
View
you got my idea right..now i want a code for this.you can proceed in the first way.i'm new to wpf.That is why i'm asking for a code
help me please
prapaug
24-Jul-13 3:21am
View
Can you please write a full code?
prapaug
24-Jul-13 2:27am
View
you got any idea sarin?
prapaug
24-Jul-13 2:16am
View
There is nothing in the main window.i wanna create all these....
A list of things
A grid.
Some data associated with each thing in list(it can be anything...a sigle thing is neede to differentiate)
on clicking each item in ist i should be able to view content associated with each...
If you got my idea ,please let me know
prapaug
24-Jul-13 1:57am
View
Sarin,i have a list of items.Not a single button.when i select each item the data related to that should be listed in the grid.and when i select next item,then data corresponding to that.And the previous data should not be in the grid.If possible Please help me with a complete code.
prapaug
24-Jul-13 1:47am
View
so first i want to create stack panel.right?
prapaug
24-Jul-13 1:46am
View
i want to add the user controls in same window where the button is present.I'm a beginner in c#.so can you write a code for me?
prapaug
23-Jul-13 1:52am
View
can you pls write the entire cs code and xaml?
prapaug
23-Jul-13 1:08am
View
It's not working.Anyone have any other answers???
Help me fast.
prapaug
22-Jul-13 8:21am
View
first give me standard code.my usercontrol windoe=ws are usercontrol1 and usercontrol2
prapaug
22-Jul-13 7:19am
View
ANYONE PLEASE HELP ME FAST..ITS URGENT
prapaug
11-Jul-13 6:01am
View
Can you please explain how its working???
prapaug
11-Jul-13 5:58am
View
its working.................
THANK YOU FOR YOUR HELP.
looking forward for more helpls
THANK you AGAIN
prapaug
11-Jul-13 5:40am
View
this is my modified .cs file:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Data;
namespace WpfApplication13
{
public partial class MainWindow: Window
{
DataGrid datagrid1 = new DataGrid();
public MainWindow()
{
DataTable dt = new DataTable();
dt.Columns.Add("Name");
dt.Columns.Add("ID");
DataRow dr = dt.NewRow();
dr["Name"] = "Raman";
dr["ID"] = "Raman";
dt.Rows.Add(dr);
datagrid1.ItemsSource = dt.DefaultView;
}
private void Window_Loaded(object sender, RoutedEventArgs e)
{
}
private void textbox1_TextChanged(object sender, TextChangedEventArgs e)
{
}
private void textbox2_TextChanged(object sender, TextChangedEventArgs e)
{
}
public void button1_Click(object sender, RoutedEventArgs e)
{
DataView dv = datagrid1.ItemsSource as DataView;
DataTable dt = dv.Table;
DataRow dr = dt.NewRow();
dr["Name"] =textbox1.Text;
dr["ID"] = textbox2.Text;
dt.Rows.Add(dr);
}
private void datagrid1_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
}
}
}
and following is my xaml code:
<window x:class="WpfApplication13.MainWindow"
="" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:dg="http://schemas.microsoft.com/wpf/2008/toolkit" title="Window3" height="300" width="300">
<grid>
<textbox height="23" horizontalalignment="Left" margin="12,12,0,0" x:name="textbox1" verticalalignment="Top" width="120" textchanged="textbox1_TextChanged">
<textbox height="23" horizontalalignment="Right" margin="12,12,0,0" x:name="textbox2" verticalalignment="Top" width="120" textchanged="textbox2_TextChanged">
<datagrid autogeneratecolumns="False" x:name="datagrid2" selectionchanged="datagrid1_SelectionChanged" datacontext="{Binding DGSource}" canuseraddrows="{Binding ElementName=datagrid1}" canuserdeleterows="{Binding ElementName=datagrid1}" minrowheight="1" margin="12,41,12,79" fontweight="Bold">
<datagrid.columns>
<datagridtextcolumn header="Name" width="100" canuserresize="False" binding="{Binding Name}" canuserreorder="False">
<datagridtextcolumn header="ID" width="100" canuserresize="False" binding="{Binding ID}" canuserreorder="False">
<Button Name="btn" Content="ADD" Margin="33,0,29,20" Height="35" Click="button1_Click" VerticalAlignment="Bottom"/>
BUT I CANT ADD MY FIELDS TO DATAGRID STILL.WHAT WILL BE THE PROBLEM???
please help me.
prapaug
11-Jul-13 5:29am
View
That error is cleared.Now i have only one more error.That is:
Error 1 The type 'WpfApplication13.MainWindow' already contains a definition for 'datagrid1'
Please help me fast.
prapaug
11-Jul-13 5:24am
View
now i have the error:
Error 6 The name 'textbox2' does not exist in the current context
and
The name textbox1 doen not exist in the current context.
please help
prapaug
11-Jul-13 4:55am
View
Thanx..its working now.
but now i have another error.it says :
'xmlns:x' is a duplicate attribute name. Line 3, position 9.' XML is not valid.
what should i do..???
prapaug
11-Jul-13 4:45am
View
i din't find datatable keyword in wpf.what will i do now??
prapaug
11-Jul-13 3:33am
View
how?
prapaug
11-Jul-13 3:12am
View
i'm not having a datatable keyword.
prapaug
11-Jul-13 3:02am
View
its showin an error like:
Error 4 The type or namespace name 'userinfo' could not be found (are you missing a using directive or an assembly reference?)
prapaug
11-Jul-13 2:44am
View
so you want me to add a class like this?
public class INotifyPropertyChanged
{
public string Name;
public string ID;
}
is this enough?
prapaug
11-Jul-13 2:28am
View
i'm not able to create an object dt of datatable.why is it like that?
prapaug
11-Jul-13 2:27am
View
can you please edit my xaml code and xaml.cs code?I want the full solution.Please do it as soon as possible.Thanks for your reply
Show More