15,742,120 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 Javascript questions
View C++ questions
View Python questions
View Java 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 Member 15061773 (Top 36 by date)
Member 15061773
7-Mar-23 10:58am
View
Thank you very much for your reply, I already asked this question with proper code in Microsoft question and answer forum.
Here is the link : https://learn.microsoft.com/en-us/answers/questions/1141456/how-to-refresh-combobox-items-at-runtime-when-comb
I can not understand what you saying by "You will probably need to define your own class which wraps the AudioDevice class". Any code guide will a great help.
Member 15061773
7-Mar-23 9:51am
View
Forgive me sir, Actually I am stuck here for almost 15 days. I don't mean that. You do enough help for me. Sorry.
Member 15061773
7-Mar-23 8:53am
View
Love the effort you put in to answer my question, but still I am unable to understand. I already asked this question with full code and proper explanation on Microsoft question and answer forum but I don't get any satisfied answer from there.
Here is the link : https://learn.microsoft.com/en-us/answers/questions/1141456/how-to-refresh-combobox-items-at-runtime-when-comb
Make sure that you read this question throughly, and give your decent code answer.
Member 15061773
7-Mar-23 7:15am
View
Again brilliant answer, I fully understand, ultimately what you say is option 2 is really better because observable collection will cascade to the ListCollectionView and automatically update the dropdown contents.
but any code guide on option 2? How can I declare an observable collection as itemsource for a ListCollectionView?
By the thank you very much for your crystal clear theory answer.
Member 15061773
7-Mar-23 6:49am
View
Your answer is outstanding, I already understand the theory part. In your first option you say, Whenever I get an updated devices list I need to update the ComboBox with a ListCollectionView and assigning it to the cmb1.ItemsSource.
Suppose, I open the ComboBox dropdown and at that time any of the item from the device list is unplugged or remove from the computer, How can I detect that?
I also understand your second option but I don't know how to apply it in code. I wish you can give me proper code example.
Member 15061773
7-Mar-23 6:33am
View
I already tried CollectionChanged but that does not detect any item changes. I wish you can give me any code example.
Member 15061773
7-Mar-23 5:28am
View
Thank you very much sir, for your reply, I want to mean "changes to the device list which should propagate down to the combobox"
Member 15061773
18-Jan-23 13:00pm
View
Suppose, my list contain 5 strings. And that list is bind as Combobox item source. Now tell me how I save that in settings file at run time. Please help.
Member 15061773
18-Jan-23 12:22pm
View
Very brilliant answer. I wish you can give me any code example. Just see the last part of my question where I already told about the Combobox item source.
Somehow we need to relate this with settings file.
Member 15061773
18-Jan-23 12:02pm
View
But, unfortunately that's not working when Combobox content are dynamic that's why I asking this question in this forum. If you know then please tell me.
Member 15061773
18-Jan-23 11:38am
View
Thank you very much for understanding my problem. Actually, my combo box content are showing available audio devices. May be sometime different type of devices are available that's why combo contains totally different items next time you run. And if there no item changes happen then the previously selected option should be shown in the combo box when I restart my application.
If any item changes happen then the combo box should go to the "System default".
But still, I want to save from a Dynamic content can you please tell me? how can I do that?
Member 15061773
1-Jan-23 8:30am
View
I use the Code behind method to add Content in combobox in this way.. this.cmb1.ItemsSource = lcv; Just see the first part of my question, where I give the List<> code.
Member 15061773
31-Dec-22 11:00am
View
Dear sir, sorry I know slightly about ObservableCollection that it's best to use for updating the UI But in this type of situation I hardly have any idea to implement it. Can you please help. I definitely accept your answer.
Member 15061773
31-Dec-22 10:18am
View
I already know that, Can you please Complete the full code after applying Observable Collection to implement data binding. So, that I accept your answer.
Member 15061773
19-Dec-22 5:18am
View
Thank you very much sir, for your crystal clear explanation. Your code does not solve my problem.
Here is the question link where I described each and every part of the question is clearly explain which I asked on Microsoft Question and Answer Forum :
https://learn.microsoft.com/en-us/answers/questions/1092033/how-to-change-foreground-color-of-a-combobox-on-se.html
Member 15061773
18-Dec-22 5:21am
View
Thank you very much sir, but there nothing detect when I do debugging because my application don't crash anywhere, it's just does not add the attach behavior.
Can you give me another solution? a Costume class may be the solution.
Member 15061773
18-Dec-22 3:27am
View
His, answer is wrong if you read all comments then you clearly understand. His code has Data Context error, though I solve this problem later by doing datacontext="{Binding RelativeSource={RelativeSource Self}}" this data binding.
But still I don't get the desire effect I want.
Can you please solve my question?
Member 15061773
17-Dec-22 14:16pm
View
According to the attach behavior, the IsFocus should false when mouseover true but I don't get this effect in my Combobox.
If you want to see the full source code then I already post on Microsoft Question and answer forum. I also post required GIF image there.
Here is the link : https://learn.microsoft.com/en-us/answers/questions/1092033/how-to-change-foreground-color-of-a-combobox-on-se.html
Member 15061773
12-Dec-22 14:45pm
View
Hi, sir Can you write an attach behavior for IsFocus property? I need your help.
Member 15061773
23-Oct-22 12:18pm
View
Ok, I am sorry for advocating for MVVM. Now, tell me how I implememnt this using a user Control. Give your answer with proper code and I will accept your answer. Please solve my problem, I stuck it here for my project for a long time.
Member 15061773
23-Oct-22 12:17pm
View
Ok, I am sorry for advocating for MVVM. Now, tell me how I implememnt this using a user Control. Give your answer with proper code and I will accept your answer. Please solve my problem, I stuck it here for my project for a long time.
Member 15061773
23-Oct-22 10:07am
View
This is the answer I want. Brilliant explanation. Can you give me the proper code on How I use the Preview tunneling? Because I don't want to use a user control with a click handler (for each item), that's violets the MVVM design pattern. I already given all of my code. Kindly give your full code for applying preview tunneling.
Member 15061773
22-Oct-22 12:20pm
View
Thank you very much sir, for your reply. I already do that what you saying. Just give me a code solution of my problem if you or any of your friends and family member is a WPF developer then tell them my issue and kindly share my question link with them.
Member 15061773
22-Oct-22 5:54am
View
Can you have some demo code because it's too much complex. Give your answer with proper code and I definitely accept your answer.
Member 15061773
22-Oct-22 5:12am
View
I also try to use the PreviewMouse Down event but the result is same. I don't want to use any timer delay that's why I use MVVM pattern. If you have any code solution then please tell me. I am in great trouble.
Member 15061773
24-Mar-22 15:13pm
View
Thank you very much sir. I understand that I should do this from Code behind. Can you please give me the solution with proper code. If you do then I shall be grateful to you. You also give me any example, links etc.
Member 15061773
27-Oct-21 11:42am
View
I understand that and I also know that sir. I don't use any long sentence as button content in the ToolTip content. Due to design purpose I have to do it in this way. By the way it's not my project. It's our office project so, the client wants that's way. Please help me. And kindly read the stack overflow post which I given as a link.
If you know how to achieve by using a trigger then please help me. Don't give your personal suggestion. If you know that then please tell me otherwise just ignore.
Member 15061773
27-Oct-21 11:32am
View
Thank you sir. My problem actually solved in Stack overflow but the problem is using an third party NuGet packages which is unfortunately not available now.
Can you please tell me that How I can solve this using any trigger? or Data Binding
Here is the Stack overflow link :https://stackoverflow.com/questions/63510347/tooltip-appears-instantly-in-wpf-does-not-trigger-initial-delay
Member 15061773
2-Aug-21 15:55pm
View
Can you please post the code what you tried? it helps me a lot.
Member 15061773
2-Aug-21 10:56am
View
Thank you sir for your reply. But TextFormattingMode does not solve my problem. I hope we have to do something in data binding. If you know about multi binding then please help me to solve this problem.
Member 15061773
2-Aug-21 2:57am
View
Thank you sir. If I run those binding separately then that bindings are perfectly working. That means there no error in binding but only error comes in the multi binding. You already know what I want, that means I want font size =10 and the font size should be clearly visible in every screen resolution.
I suggest you to give me your binding suggestion regarding the Font size, because you already solve the problem of the converter.
Member 15061773
1-Aug-21 16:25pm
View
Thank you sir for your guide. But again I face the error in the converter. I get some error like this unable to cast object of type 'ms.internal.namedobject' to type 'system.iconvertible.
Member 15061773
1-Aug-21 15:29pm
View
Thank you for your help but your code is not working. As soon as I lower the screen resolution the text became blurry. Previously I solve this by binding to {x:Static Application.Current} to the font size. Your double collection is not solve my problem. Please give me a solution to add this line in the multi binding. <binding source="{x:Static Application.Current}" path="fontSize" mode="TwoWay">
Member 15061773
1-Aug-21 8:05am
View
the fontsize is just like other number. I both tested with int and double but the error "Specified cast is not working" is same.
Member 15061773
31-Jul-21 17:11pm
View
Thank you sir for your reply. Your code is slightly working But I get the error "Specified cast is not working".
Member 15061773
22-Jul-21 11:41am
View
Please kindly give the full source code example. Because Path=TextSize is not working.
Show More