15,883,705 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 Thomas Duwe (Top 40 by date)
Thomas Duwe
21-May-13 3:43am
View
You didn't mention this second case in detail, so I couldn't begin to guess as to what you really want.
But regardless, this second case is almost the same: remember the first/last row you want to be visible and
call dataGrid1.ScrollIntoView(itemToScrollTo);
Remember that itemToScrollTo needs to be the DataRow of your DataTable.
Thomas Duwe
22-Apr-13 6:17am
View
If you change the code in the *.Designer.cs file you must be careful, what you change.
AFAIK the designer of Visual Studio is not capable of doing what you want (array-initialization of datagridviews).
Changing the name of some field/variable works just fine, but changing the way some fields are initialized/read/write
can result in errors.
Thomas Duwe
22-Apr-13 5:17am
View
Are you changing the automatically generated code in the <FormName>.Designer.cs?
Thomas Duwe
9-Apr-13 5:57am
View
I used DataTriggers in the DataTemplate in conjunction with a converter in the DataTrigger's binding to return true/false if something needed a change.
For example you can trigger the changes if the DataContext of the DataGridCell changes:
<datatrigger value="True" binding="{Binding Path=DataContext, UpdateSourceTrigger=PropertyChanged, RelativeSource={RelativeSource AncestorType=DataGridCell, Mode=FindAncestor}, Converter={<converter here>}}" Value="True">
</datatrigger>
Whereas the converter needs to return true or false so that the binding will work.
And inside of DataTrigger you can then set the properties of "numTextBlock".
Thomas Duwe
8-Apr-13 2:57am
View
Do you want access to the TextBox or the bound value of the TextBox?
Thomas Duwe
3-Apr-13 4:01am
View
How do you achive that the border turns red?
A good overview/introduction to validation you can find here:
http://www.codeproject.com/Articles/15239/Validation-in-Windows-Presentation-Foundation
Thomas Duwe
1-Apr-13 11:41am
View
The ListBox cannot perform the binding to TagPriorityOfValue1 because you changed the DataContext of the ListBox to the instance of the Settings class and this class doesn't contain a property TagPriorityOfValue1.
If you want further help then post the class which contains the TagPriorityOfValue1 property and I will show you what to do.
Thomas Duwe
28-Mar-13 10:04am
View
Of course this can't work.
If you set the DataContext of the ListBox to Settings, then the Binding Path=DataContext.Settings....
is wrong and it should be Binding Path=DataContext.band1TextColor.
And your setting of the DataContext of the ListBox was not what I said you should do.
Obviously you need to study a little bit more about DataBinding and XAML/code behind and what the DataContext really is.
As I said, you should define a property public Settings Settings {get; set;} in the object, that is the DataContext of your ListBox.
The DataContext of your ListBox is usually an instance of a class.
Where did you define the property TagValueOfPriority1?
There you should define the property for Settings, because your binding of the ItemsSource of the ListBox is a short version of the binding:
{Binding Path=DataContext.TagValueOfPriority1}.
So whereever you defined the property of TagValueOfPriority1 you should define the property for Settings and assign a valid instance to it.
Thomas Duwe
28-Mar-13 6:49am
View
You don't have to add the Settings to the ListBox. As I said, you need a property named Settings in the DataContext of the ListBox,
where the TagValueOfPriority1 property is defined.
Thomas Duwe
27-Mar-13 8:58am
View
Did you look here?:
http://www.codeproject.com/Articles/23116/WPF-Arrow-and-Custom-Shapes
Thomas Duwe
19-Mar-13 8:39am
View
Did you check the path to msenv100p.dll?
Try to re-register the msenv100p.dll and actxprxy.dll
Does this work?
If this is not working, try to start visual studio in safemode, try to run your website.
Other option is to reinstall Visual Studio
Thomas Duwe
19-Mar-13 4:17am
View
What OS are you running? 32bit or 64bit?
What Visual Studio version are you using?
Thomas Duwe
4-Mar-13 11:30am
View
Glad I could help :-)
Thomas Duwe
26-Feb-13 3:45am
View
If someone would like to look into your code and test it, this someone needs all the referenced classes and structs etc....
Thomas Duwe
13-Feb-13 12:15pm
View
You didn't set a targetnamespace in b.xsd, so the targetnamespace from a.xsd is used.
Try to give b.xsd a different targetnamespace than a.xsd and the b.xsd xmlschema should have a different one.
Thomas Duwe
6-Feb-13 4:26am
View
Yes I understand your problem, but as I said, the DataGrid does not deselect a row if you only click with the mouse
on the selected row.
You must have somewhere code that unselects the row if you click the second time.
Thomas Duwe
6-Feb-13 3:44am
View
Ah sorry, how do you select the row twice? Only with left-mouse-click?
If so, then the deselection of the row shouldn't take place, it says selected, thats the default behavior of the DataGrid.
If this isn't the behavior you see, then you must have some code somewhere changing the selected row of the datagrid.
Thomas Duwe
6-Feb-13 3:28am
View
This is for row selection, not column....as you asked in your original question.
Thomas Duwe
30-Jan-13 5:58am
View
Why are you constantly reposting your question?
Look here:
http://www.codeproject.com/Questions/536127/usingplusaplusmissingplusdirectiveplusandplusassem
Thomas Duwe
29-Jan-13 3:11am
View
How about listening to the Selected/Unselected event of the CheckComboBox and if the 'All' item is selected(checked), then
set IsEnabled=false for all other items and optionally remove all other items from the SelectedItems property of the CheckComboBox.
That's really not the best way but it should work.
Thomas Duwe
23-Jan-13 5:24am
View
Thats an exact copy of the constructor of SpanNearQuery.java from the Lucene project.
Perhaps you should look at the Lucene.Net project page: http://lucenenet.apache.org/
Thomas Duwe
23-Jan-13 3:50am
View
I think you have to change the sql command.
Now you send a command with 2 select commands inside. Usually only the results of the second
command are retrieved from the database.
I think your command should be:
select sale.id,sale.name,sale.author,sale.price,bill.invc_id, bill.totalprice from sale, bill
Although this select statement really doesn't make much sense.
Thomas Duwe
17-Jan-13 4:53am
View
DataTrigger can be bound to any property (CLR and dependency property, whereas class containing CLR property needs to implement INotifyPropertyChanged interface)
Trigger can be bound only to Dependency Property.
Do you tried it?
Or try instead of Condition Binding={Binding Path=IsSelected...} -> Property=IsSelected
Thomas Duwe
17-Jan-13 3:51am
View
Please show the PreviewMouseLeftButtonDown code
Thomas Duwe
17-Jan-13 3:43am
View
And where is the problem summing up SalePrice? If you have a DataSet iterate the rows over the appropiate table in it
and get the right columns and build a sum of SalePrice*SolQuantity...?
Have a property (e.g. TotalSale) in MainWindow or somewhere else and bind it to a textbox.
Thomas Duwe
17-Jan-13 3:31am
View
And what's your problem? What have you tried?
Where is the ItemsSource property of the first listbox set?
Show some code....
Thomas Duwe
13-Nov-12 3:32am
View
I don't think this is something that can be done using only inputbindings.
What comes to mind is something like this: if user presses Ctrl+M, save the state and if the user presses again an M, then execute the appropiate command.
Thomas Duwe
25-Oct-12 4:12am
View
What do you mean with callout? What do you want to achieve?
Thomas Duwe
13-Sep-12 5:04am
View
Where is this exception generated/where is the origin of the exception?
Post a stacktrace of the exception.
Thomas Duwe
12-Sep-12 4:12am
View
without code to look at nobody can help you.
what are you doing in the selected event and what specifically is going wrong with the visibility of the groupbox?
Thomas Duwe
11-Sep-12 4:31am
View
Deleted
thats not a solution
Thomas Duwe
11-Sep-12 2:51am
View
Did you search the site for this?
I found:
http://www.codeproject.com/Articles/202464/How-to-use-a-WebCam-in-C-with-the-NET-Framework-4
or
http://www.codeproject.com/Articles/285964/WPF-Webcam-Control
Bye Thomas.
Thomas Duwe
10-Sep-12 8:40am
View
Yeah, I too was against code behind in this case, but I found no other way :-(
Thomas Duwe
10-Sep-12 7:33am
View
I suppose you are creating a Task or background thread in the MyDllClass and from this Task/background thread you access some properties/controls of the UI.
If that's the case then find further information here:
http://www.codeproject.com/Articles/37314/Useful-WPF-Threading-Extension-Method
Thomas Duwe
10-Sep-12 7:20am
View
I think this depends on how your view and viewmodel are created and shown.
Say if you have a view factory with some method ShowCustomDialog(args...)
and you instantiate your viewmodel and view and assigning the datacontext of the view manually in this factory method, there shouldn't be a problem (I think).
Thomas Duwe
10-Sep-12 5:44am
View
see my answer here for the same question:
http://www.codeproject.com/Answers/455040/WPF-How-to-set-focus-to-next-cell-in-datagrid#answer1
Thomas Duwe
8-Sep-12 6:36am
View
No, I see nothing wrong with your bindings, but you have no binding to your MaterialCode property in the grid-xaml.
Thomas Duwe
7-Sep-12 9:36am
View
Then maybe this has something to do with your autocompletebox not updating it's Text property. But without the code for you autocompletebox, I can't do anything further to help you.
Thomas Duwe
29-Aug-12 6:08am
View
You have to be a little more specific.
What datagrid are you using?
How is the list of data bound to the grid?
What's happening in your save method?
Some code would be really helpful, otherwise nobody can help you.
Thomas Duwe
28-Jun-12 3:39am
View
As I told you, if
datacontext.selectTable1()
returns an instance of
DataTable
you could write the above statement.
Without further information what
datacontext.selectTable1()
returns
I can't help you.
Show More