|
Hi,
My Project is devoloped with silverlight4.
In my Project i have used some telerik controls with version 3.
But, the problem with my application is it is taking too much memmory.
Actually my Application is showing records for perticular order no,
so, can u help me.
How can i reduce the memory?
Thanks,
Umesh Tayade
|
|
|
|
|
How do you know it's taking too much memory?
If it's your application don't you know how it's using memory?
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi,
I had checked it in Task Manager.
Actually i havent devoloped this Application.
I am just going through it and i came to know that it is making full cpu usage.
can suggest me what are the possibilities of it?
How do i overcome it?
Thanks,
Umesh Tayade
|
|
|
|
|
I recently wrote an article about what Telerik did.
They have created something they named "Minifier" it takes your silverlight project and remove unused things and leave you with a optimized project. You should even try their "JustCode" it makes sure you have neat code that has less bugs.
http://www.dotnetfunda.com/articles/article1282-how-to-reduce-the-size-of-your-silverlight-application-with-telerik-minifie-.aspx[^]
Hope it helps
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
hi experts,
I am created a non client area Form and customize the Form's default border style border style, now i am facing a problem is that after i Maximize the window will hide the Window's taskbar
Please Help me
thanks in advanse
|
|
|
|
|
Hi,
another datagrid question :=)
I searched the web for this, but unfortunatelly did not find anything useful.
What I want to achieve is, if the user presses tab on the last visible column of a datagrid, it should automatically create the new line and open the first line for editing data.
So if I'm here:
Screenshot 1
and press tab the datagrid should do this:
Screenshot 2
Any ideas?
Kind regards,
Nico
|
|
|
|
|
Assuming the default TAB behavior (i.e. tabbing out of the final cell moves the focus from the grid to the next control) I would try providing a LostKeyboardFocus that inserts a row, and brings the focus back into the initial cell of that newly inserted row.
P.S. This may or may not work when there are no other controls on the page: I do not know if you get a LostKeyboardFocus+GotKeyboardFocus when the focus circles back to the same control.
|
|
|
|
|
Okay thanks for your answer
But I don't think this is the way I want to go. I thought about something like:
- Event "CurrentCellChanged" or something similar
- If my cursor was in the last visible column and the user pressed "TAB" then do something
But I had no luck putting this correctly together.
I have extreme problems finding out if the Current Cell is in the last visible column...
Kind regards,
nico
|
|
|
|
|
Yeah, that's why I suggested using the lost focus: the event figures out the last visible cell very reliably.
|
|
|
|
|
Ah okay then I didn't understand your first post correctly.
I'll give it a try...
|
|
|
|
|
In my wpf application, there are several textboxes to show the values of the data in the database.
The storedprocedure used, returns fields such as Notes and EnglishNotes as you see in xaml below.
The problem is that txtNotes always shows the value in txtEnglishNotes
I have checked and the storedprocedure does return the correct value for Notes and EnglishNotes but somehow the two textboxes show the value in txtEnglishNotes always.
Do you see why please?
Thanks
<TextBox Grid.Row="5" Margin="5" Name="txtNotes"
VerticalScrollBarVisibility="Visible" TextWrapping="Wrap"
Grid.ColumnSpan="2"
Text="{Binding Path=Notes}" MaxLength="100" />
<TextBox Grid.Row="12" Margin="5" Name="txtEnglishNotes" Grid.ColumnSpan="2"
VerticalScrollBarVisibility="Visible" TextWrapping="Wrap"
Text="{Binding Path=EnglishNotes}" MaxLength="100" />
|
|
|
|
|
arkiboys wrote: Do you see why please?
Nope, the posted snippet looks fine. Your problem is likely elsewhere.
|
|
|
|
|
Where can the problem be?
I have also checked the SP which returns the correct values for each field.
Thanks
|
|
|
|
|
Look for any code that refers to those text boxes... Maybe you're doing something with them in the code-behind that you forgot about. If you have trouble finding it, remove their names (WPF controls usually don't need names) and see what breaks.
Set breakpoints in the getters for the bound properties, and check their values when they're actually retrieved... If they're dependency properties, add a PropertyChanged handler to the definition and set a breakpoint to see if they're being changed.
|
|
|
|
|
HOw do I put "Set breakpoints in the getters for the bound properties" ?
I ask because at present I am not using field properties as in get or set...
So not sure where you mean to place breakpoint.
Thanks
|
|
|
|
|
When you read the values out of the database, where do you put them? There must be some piece of code that contains these properties. Put the breakpoints on the code that populates these properties - this is debugging 101; you need to learn this stuff rather than coming here and asking us to solve this without sight of your code.
|
|
|
|
|
This kind of debugging is what I have done already but have not spotted where the error is. I will continue again.
Thanks
|
|
|
|
|
Well, you have bound the controls to the Notes and EnglishNotes properties of some Class. Therefore, you need to set the breakpoint in the setter for these properties. Then when these properties get updated, you can check whether the expected values for these properties are being set. This sounds like a classic case of two properties getting set to the same value like this
foreach (DataRow dr in ds.Tables[0].Rows)
{
MyClass.property2 = dr.IsNull(2) ? String.Empty : (string)dr.ItemArray[3];
MyClass.property3 = dr.IsNull(3) ? String.Empty : (string)dr.ItemArray[3];
}
instead of
foreach (DataRow dr in ds.Tables[0].Rows)
{
MyClass.property2 = dr.IsNull(2) ? String.Empty : (string)dr.ItemArray[2];
MyClass.property3 = dr.IsNull(3) ? String.Empty : (string)dr.ItemArray[3];
}
...and I have extensive experience writing computer code, including OIC, BTW, BRB, IMHO, LMAO, ROFL, TTYL.....
|
|
|
|
|
Notes and EnglishNotes need to be properties for the binding to work properly.
public string Notes;
private string _notes;
public string Notes { get { return _notes; } set { _notes = value; } }
public string Notes { get; set; }
|
|
|
|
|
Your xaml code looks ok.
Try and have a look at the place where you are populating the model and make sure right values are being passed into the model attributes.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
|
|
|
|
|
Hi,
I have Question about the use of Observable Collection? During reading about MVVM Pattern i read about the observable collection that it reflect the changes to the UI Automatically which is not possible in the List collection.But i really dont understand it what it exactly means in practical terms. I want a demo for the Difference between the List VS ObservableCollection Vs PropertyChangedEventHandler. I have read the document on your site but i am yet not clear about it? will you please help me?
|
|
|
|
|
The ObservableCollection implements the INotifyCollectionChanged interface, so it fires a CollectionChanged event whenever an element is added, removed, replaced, or moved.
The binding system knows how to react to objects that implement INotifyCollectionChanged and INotifyPropertyChanged... So when you bind to one of those, the binding system hooks the event and updates itself when it gets notified of a change.
The List class doesn't implement that interface.
|
|
|
|
|
Can u please explain me how the changes to the _studentList can reflect to UI with code?
|
|
|
|
|
I just explained it. The ObservableCollection fires a CollectionChanged event. The data binding system handles that event and triggers an update. That's it.
|
|
|
|
|
Sorry, but i am not getting what exactly i want.
Actually I am new to silverlight so i am not clear with it.
In the Given code (Populating a DataGrid in a Silverlight Application using MVVM)
it is not calling the PropertyChanged Event. Can u provide code which calls that event.
|
|
|
|