Why not just use the Ribbon controls (e.g. "split menu item" that looks like a "button")?
Have you ever used these Ribbon controls? I have. WAY WAY WAY too over cooked.
That's exactly what I'm trying to avoid - paying hundreds or thousands of dollars for control suites that have a limited set of controls and are either way too over engineered or don't do enough.
1) You almost never get all the controls you want, so you usually then have to include multiple third party controls into your app.
2) Many of them are crap (Infragistics is a good example), Telerik is OK but lacks some things
3) For what you pay for you just don't get enough. And I'm talking WITHOUT the source.
4) Tech support is almost always a nightmare.
If I have the code, and created my own suite, then I can modify it any way I want and not rely on some other vendor.
Gerry Schmitz wrote:
You're duplicating existing functionality.
Not necessarily. Assuming you could purchase a complete set of controls that functioned EXACTLY the way you want, then you would be right. But I've yet to find a set of controls that is that complete.
Again, if it's just a set of controls, then how much 'functionality' are we talking a about?? If we were talking about a specialized API that was specific to some app or piece of equipment, then writing a new one would make no sense. But for a set of controls, I think I have the advantage here.
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
OK, we definitely went off the rails in this discussion as we never got around to the styling question.
For some reason you are focusing on "existing functionality" where my question is only about styling.
So when you have a control that is a composite of other controls, compiled into another assembly, how do you create a style that can be applied to that control? Do you have to name the parts of the control and target them that way?
Like I said in my other example, assume you have a UserControl a ListBox, a CheckBox, and a button, call it Widget... Widget is compiled into another assembly.
For ApplicationA I may want the background of the listbox to be red, and the button to be round. Yet for ApplicationB it could look entirely different.
If your styling is at the application level, how do those individual pieces get styled? If you just rely on TargetType, the ALL buttons would have that look. That leaves specifically targeting each individual part of the control.
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
I want my entire application to have a similar look and feel; as I expect the user does.
Style the most common elements first: TextBoxes; TextBlocks; FontFamily; etc. at the "app" level.
Anchor all your elements in a dummy form / window and see how they look.
The ones that need special handling (negative margins; for example) get styles at the "level" most appropriate: element; parent element; user control; window; dll).
I'm current working on a User Control that does it's own keyboard handling; creates / deletes siblings on the fly; changes color based on "mode"; etc. In this case, I expect a lot of customizing at the control level but still expect to "inherit" colors and fonts from a "higher resource".
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
I am trying to make a small "book library" application where readers can rent books.
My application is tructured like this: 4 views(with their associated viewmodels). MainWindow is the main view. Inside it i have a content control where i display the other 3 secondary/child views:HomeView, BookManagingView, ReaderManagingView. The default selected view is HomeView, where i have 2 ListViews(for Readers and Books), and some buttons. In my ReaderManagingView i have some textboxes and buttons to add/update/delete readers from database and listview.
The database has 3 tables: Books, Readers, and RentedBooks.
What i am trying to do is: when i add/update/delete users from my database, i want my changes to reflect (almost)instantly in my ListView.
The problem: The changes are visible only after i restart the application. What should i do, so that my Readers ListView updates after i add/update/delete a user?
Alternatively, as a "quick-and-dirty" approach, you could store the HomeViewModel instance passed to the ReaderManagingViewModel constructor, and call public methods on that instance to add, update and delete readers from the list.
Depending on your requirements, you could either have a single method to reload the entire list:
using (BookDBDataContext rdb = new BookDBDataContext())
ReadersList = new ObservableCollection<Reader>(rdb.Readers);
Or you could have separate methods to add, update and delete the readers:
I have the busiest WPF form I have ever created, 23 combo boxes, 35 text boxes or date pickers and a bunch of buttons and that is just the first tab, there are 10 other tabs with lists and user controls. All user controls are lazy loaded when the tab is selected.
There is a load of automation on the form where 1 action filters/disables 1 or more controls.
I load the data using a BGW thread and that is fast and consistent. The data is loaded into a local object and when the loading is complete I bind the selected object
SelectedObject = LocalObject
The binding is initially resonably fast, sub 1 second, this blows out to 8+ seconds with subsequent page loads. The delay seems to be caused by binding the SelectedObject to the LocalObject (the delay is so huge it can easily be tracked to that line of code).
Any suggestions how I can alleviate the delay problem when binding.
Never underestimate the power of human stupidity
I feel quite defeated and overwhelmed at present. Apologies if this is done incorrectly. Any assistance would be warmly welcomed.
I'm writing a program in WPF, using c#, which should collect inputs via relevant textbox fields. These inputs should filter through to my sql command parameters, where I can then run the stored procedure. Then the info should populate back into a Datagrid in WPF mainwindow.
Basically, searching through historical stock pricing, returning all info between date, price, volume, etc, based on whichever values the user selects.
My SQL stored procedure returns expected values. The only way I can get my program to return the same values is to hardcode each input. I know I am missing the link between getting the values from each textbox into the SQL command parameters, but I'm at a loss as to how to do this. I think I need to set an event in my "mainwindow.xaml.cs" but I just cannot work out the right syntax...
You'll need to modify your MSQ method to accept the parameters. It looks like your StockValues class is intended to hold the parameter values.
publicstatic DataTable MSQ(StockValues sv)
using (SqlConnection conn = Database.GetSqlConnection())
using (SqlCommand cmd = new SqlCommand("SELECT date, stock_symbol, stock_price_open, stock_price_close, stock_price_lo, stock_price_high, stock_price_adj_close, stock_volume FROM NYSE WHERE date BETWEEN @date_from AND @date_to AND stock_symbol LIKE @stock_symbol AND stock_price_open BETWEEN @stock_price_open_from AND @stock_price_open_to AND stock_price_close BETWEEN @stock_price_close_from AND @stock_price_adj_close_to AND stock_price_lo BETWEEN @stock_price_lo_from AND @stock_price_lo_to AND stock_price_high BETWEEN @stock_price_high_from AND @stock_price_high_to AND stock_price_adj_close BETWEEN @stock_price_adj_close_from AND @stock_price_adj_close_to AND stock_volume BETWEEN @stock_volume_from AND @stock_volume_to", conn))
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataTable table = new DataTable();
In your buttonFind_Click method, you'll need to create an instance of the StockValues class, populate it from the textbox values, and then pass it to the MSQ method.
privatevoid buttonFind_Click(object sender, RoutedEventArgs e)
StockValues sv = new StockValues
stock_symbol = textBoxStockSymbol.Text
if (DateTime.TryParse(textBoxDateFrom.Text, out date))
sv.sv.date_from = date;
if (DateTime.TryParse(textBoxDateTo.Text, out date))
sv.date_to = date;
if (float.TryParse(textBoxSPOpenFrom.Text, out valueFloat))
sv.stock_price_open_from = valueFloat;
if (float.TryParse(textBoxSPOpenTo.Text, out valueFloat))
sv.stock_price_open_to = valueFloat;
if (float.TryParse(textBoxSPCloseFrom.Text, out valueFloat))
sv.stock_price_close_from = valueFloat;
if (float.TryParse(textBoxSPCloseTo.Text, out valueFloat))
sv.stock_price_close_to = valueFloat;
if (float.TryParse(textBoxSPLowFrom.Text, out valueFloat))
sv.stock_price_lo_from = valueFloat;
if (float.TryParse(textBoxSPLowTo.Text, out valueFloat))
sv.stock_price_lo_to = valueFloat;
if (float.TryParse(textBoxSPHighFrom.Text, out valueFloat))
sv.stock_price_high_from = valueFloat;
if (float.TryParse(textBoxSPHighTo.Text, out valueFloat))
sv.stock_price_high_to = valueFloat;
if (float.TryParse(textBoxSPACloseFrom.Text, out valueFloat))
sv.stock_price_adj_close_from = valueFloat;
if (float.TryParse(textBoxSPACTo.Text, out valueFloat))
sv.stock_price_adj_close_to = valueFloat;
if (int.TryParse(textBoxSVolumeFrom.Text, out valueInt))
sv.stock_volume_from = valueInt;
if (int.TryParse(textBoxSVolumeTo.Text, out valueInt))
sv.stock_volume_to = valueInt;
DataTable MSQ = DataLayer.Stock.MSQ(sv);
dataGrid.ItemsSource = MSQ.DefaultView;
catch (SqlException sqlex)
MessageBox.Show("Error: " + sqlex.Message, "Exception Sample", MessageBoxButton.OK, MessageBoxImage.Warning);
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
And you might want to mention which version of IE you're running, and which document mode it's running in. The Array.prototype.indexOf()[^] method is supported in IE9 and later, so it looks like you're either using IE8 or earlier, or you're stuck in an old document mode.
Does the file jquery-1.10.2.min.js exist?
Why are you working with such an old version of jQuery anyway?
The current version is 3.something I think.
The latest minor version of version 1 is 12, so 1.10 is old even for jQuery 1 standards
The path is wrong. You have /Scripts for signalR (which is clearly running since you get the error from it) but you have just Scripts (note the missing / ) for jquery. Hence, the jQuery file is not being loaded.
There are two kinds of people in the world: those who can extrapolate from incomplete data.
There are only 10 types of people in the world, those who understand binary and those who don't.