It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I am new to wpf and i am working on first application i have some issues related with this
1.)Control allignment : My controls when set on the page is seem ok but when i run my application controls slightly change their position.
2.)Resolution Issue : When i try to run application on the machine with different resolutions some controls become invisible.
3.)Bind combobox :When i try to bind combobox with static or dynamic combobox items i am not able to get first item on page load for eg if i have a city combobox then i want to show "Select City" on page load.
Thanks in advance
WPF has its own alignment system that differs from those in WinForms and HTML. Be sure to study the issue before doing any markup - trust me, you will just lose time.
WPF is resolution independent - it's one of the most essential of its features. The problem should be related to the 1st one.
Could you provide additional info so that I can figure out what exactly are you trying to accomplish?
There are lots of resources on WPF. I would recommend visiting Wpf Tutorial. And for more serious reading Pro WPF in C# 2010 (by Matthew MacDonald) is great.
1 & 2) As EvAlex says, WPF has it's own alignment system using various Panel types. These grow and shrink content to take advantage of the available space and resolution.
You appear to be dragging controls onto the form in DevStudio, which is adding all those Margin="323,182,0,0" properties to you markup. This is effectively hardcoding an absolute position for your controls which is generally a bad idea.
3) You cannot set text in a WPF combo unless it is in the list of items or you have set IsEditable="True".
Read some of the tutorials that EvAlex posted. You need to get a good grasp of the basic ideas before jumping in. WPF does have a fairly steep learning curve.
Related
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
I have searched a lot for this and found a bunch of things that might help, but i a, cannot implement them in my code, and b, its not exactly what i need for my code.
Essentially, i am looking to have an inventory update web form. When you get to the page, there is one drop down list, and based on which item you select (add inventory, remove inventory) different options appear on the page.
That being said, im trying to dynamically create different fields based on the autopostback dropdown list, and i have the fields appearing fine. However, i cannot get any values that i need.
For example, whenever i try to set
theText = textBox1.Text
it comes up null.
would this be easier with java script or am i just missing something?
thanks
Though your questions is extremely vague because nobody knows what your code looks like or where it is, when dealing with dynamically created controls there are two guidelines to keep in mind:
All controls should be created and added to the page in the Page_Load so that the events and properties can be set via ViewState.
When accessing properties, they need to be accessed outside of the Page_Load because the values would not yet be available as they have not been bound. You would need to grab these values in an event like PreRender.
If you know the ID of the dynamic control you can find it with Page.FindControl():
http://msdn.microsoft.com/en-us/library/31hxzsdw.aspx
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
I want to move between tab on tab control using Navigation Buttons , and i don't want the user try to move between tabs using mouse , How can i do that ??
This doesn't really make a lot of sense.
Short of disabling the mouse cursor entirely, I don't know how you would possibly achieve this. Even if there were a way of "ignoring" mouse clicks on the tab control tabs, that would be incredibly bad UI. As far as the user would be concerned, your application would be pathetically broken—"I try to do the same thing I do in all other apps, but this one just sits here like it's dead. Stupid buggy program."
So that's a non-starter. If the goal here is to force the user to navigate through the tabs in a particular order (like a wizard), then I recommend just hiding the tabs altogether. Then the user won't be tempted to click on them or switch between them in an arbitrary order. You will have to control tab switching through code, by setting the SelectedTab or SelectedIndex property. This will also give you a place to run any additional code that you want when switching tabs.
You'll find instructions on how to hide the tabs on the TabControl in Hans's answer here.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
Right, this "might" be a tough one, as I do not even know where to start with this.
Ok, I am working on a program, which can load visual studio solutions and display them within a form when debugging.
Actually, the program does a whole lot more, but what it does, is strictly classified, so I can not go into that.
Anyway, whatever it does, does not matter in this case.
Here is the plot:
You create a project in visual studio, but when you debug it, it does so on your desktop.
What I need it to do, is debug it within a form, effectively acting as a desktop with a different resolution.
So if the specific program for example, uses Screen.PrimaryScreen.Bounds.Width - 30, as a this.left property, it needs to think that the boundaries of the form it is displayed in, is in fact the Screen.PrimaryScreen.Bounds.
I am having difficulties, trying to find out how to handle this.
Should I perhaps catch this type of code and then covert it, to work within the form?
Is there perhaps another way, to make windows simulate a different PrimaryScreen size, based on the size of the form?
EDIT: Perhaps a little more simplified.
I want the from to act as if it was my windows desktop, so any solution i load into the program, get's debugged and viewed in that form.
Handy for if you need to check how your application will look on a phone or simply in another resolution.
Point is that the program itself is going to be an IDE, but rather an online one, in which a group of people can work together on the same application/file, at the same time.
People tend to use virtual machines for these kinds of 'challenges'. It's surprising how efficient this method is! :-)
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
I played in the past on partypoker and worte my own window arranger. it arranged the windows based on a visible button, but today i switched to a different room.
the problem is that i cant find the button with spy++. spy++ doesnt recognize that there is a button. some buttons are findable with spy++, but not the one i need
any ideas how i can find this hidden button ?
If the button is not an actual button (i.e., if it's drawn through code rather than using the standard Win32 button control) you're not going to be able to find it with Spy++. It won't be an actual window, so it won't have a window handle. Thus, you're also not going to be able to click it through the normal mechanisms, like sending it a BM_CLICK message.
It's possible that they're doing this as a security feature, but it's also quite likely that this is part of the growing trend away from using the native UI controls, one that I very strongly disagree with and whose motivations I seriously question.
Your only hope is probably UI automation, which is very tricky to get right. Make sure to test the program in a virtual machine so the world doesn't end when you inevitably click the wrong thing accidentally.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 12 years ago.
So i am using visual studio 2008, asp.net 3.5, with the basic toolkit provided.
Now i have made the gui which a lot of functionality but the design is very basic.
and looks too old.
I need to give it a new look, a new feeling new designs....
like the gridview, the buttons the textboxes, the menus look basic...
this is not working for me.
Please let me how should i go about doing this.??
1) i have herd about tool kits but dont kno which ones are good..(dont want the really expensive ones) but if it is really good my company is ready to spend.
2) will the new VS 2010 or asp.net 4.0 make a difference.
3) The ajax toolkit or silverlight toolkit is any good?
4) i also need to show Charts and graphs now, currently using MS charts.. but now i need
which is good.
Your best bet is to ask very specific questions at a more appropriate forum.
For ideas on designs, look for examples online and do something similar to what you like.
http://www.thecssawards.com/
http://www.csselite.com/
For questions on how to implement a specific design in html/asp.net/whatever, post a very specific question here.
For UI guidance on how to make something specific look better, post a question on http://ui.stackexchange.com. Include a SMALL screen shot of the applicable controls (not the whole page, just the part you're asking about, or at least highlight the part you're asking about).
.NET 3.5 vs .NET 4 will have no real effect on the design of your site. Whether your choose HTML or Silverlight will have a huge effect, but neither is generally better for all sites and switching between them basically means rewriting everything, so you wouldn't do it just for design reasons.
I assume you are referring to UI control libraries.
Some of the commercial libraries that I know off and widely used include:
Telerik RAD Controls
Infragistics
DevExpress
They all have a good range of controls from Menu to Charting.