|
Im Wpf Developer but I am Fun of silverlight I Desided Design Web Site With C# Silverlight Everthings ok if Im Not Put WMA(Any media or music) in xap But When I Put Even Music in xap Web Site Very Slow Opening and 2.nd Problem is on My Leptop web site verywell shown But When I try My Web Site at Another Pc or Leptop TextBlog Resized or Looking Not Properly. Here is My Web Site Adress http://carolineolivia.com
What I Do Wrong. And What ı must Do To Performance Up My Silverlight Web Site is Only 22,9 MB Thx For Your Hellp
|
|
|
|
|
This is a repost. Avoid posting the same question in multiple places.
|
|
|
|
|
Has nothing to do with Silverlight..
What's going on while that battery progress indicator is sitting there for an excruciating amount of time?
Mark Salsbery
|
|
|
|
|
|
Pardon? I have read that sentence several times now and I can't make head nor tails of it. Try to use punctuation and capitalisation just to give us a hint as to how the sentences should actually read.
|
|
|
|
|
Yes, your XAP file was pretty big but still should load way faster. Silverlight has nothing to do with how fast your XAP file is delivered - that's up to the server and yours seems very very slow.
Mark Salsbery
|
|
|
|
|
Using WPF and MVVM pattern.
How can I tell in a DataGrid when the user changes the data in a cell?
Everything makes sense in someone's mind
|
|
|
|
|
Assuming you are letting them edit things that bind directly back to properties in a VM, you can use INotifyPropertyChanged to catch and hook into these changes.
|
|
|
|
|
I have 3 collections of data that needs to be displayed in a treeview, so I'm trying to nest them. So far my XAML looks like this:
<UserControl.Resources>
<HierarchicalDataTemplate DataType="{x:Type models:ProductModel}"
ItemsSource="{Binding Categories}">
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding ProductNumber}"></TextBlock>
</StackPanel>
</HierarchicalDataTemplate>
<HierarchicalDataTemplate DataType="{x:Type models:CategoryModel}"
ItemsSource="{Binding Parts}">
<StackPanel Orientation="Horizontal"
Margin="0,3,0,3">
<TextBlock Text="{Binding Caption}"></TextBlock>
</StackPanel>
</HierarchicalDataTemplate>
<DataTemplate DataType="{x:Type models:PartModel}">
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding PartNumber}"></TextBlock>
<TextBlock Text="-"
Margin="3,0,3,0"/>
<TextBlock Text="{Binding PartDescription}"></TextBlock>
</StackPanel>
</DataTemplate>
</UserControl.Resources>
and then
<TreeView x:Name="tvwParent"
ScrollViewer.HorizontalScrollBarVisibility="Auto"
ScrollViewer.VerticalScrollBarVisibility="Auto"
BorderThickness="0"
Grid.Row="5"
Grid.Column="1"
Margin="5">
<TreeViewItem Header="Products">
<DataTemplate>
<TreeView x:Name="tvwSelections"
ScrollViewer.HorizontalScrollBarVisibility="Auto"
ScrollViewer.VerticalScrollBarVisibility="Auto"
BorderThickness="0"
ItemsSource="{Binding Products}"/>
</DataTemplate>
</TreeViewItem>
</TreeView>
When I run it I see the Products node, but it only has one child node showing as "System.Windows.DataTemplate".
I know the templates are correct, I just cant figure out why they are not being applied to the inner tree.
Anyone see what's wrong?
[MODIFIED]
I figured it out. I removed the DataTemplate and it works perfect.
Everything makes sense in someone's mind
|
|
|
|
|
Hi Guys..
I need to add scrollviewer in dragdockpanel. how to do this? plz help me...
|
|
|
|
|
If you want to scroll the elements of your panel, you can wrap it with a ScrollViewer .
If yow want to wrap an inner part of the control with a ScrollViewer , you can do it by changing the ControlTemplate of the control.
|
|
|
|
|
Hi,
How can I have a drag and drop listbox for rearranging items. Can someone give some pointers.
I want to mimic the way how the home screen arranges the items. i.e long tap on the item to select it for drag, then drop it into a new index.
I checked silverlight toolkit, but did not find anything.
- Thanks
|
|
|
|
|
I just find one. Is the dragdroptarget help ?
public abstract class DragDropTarget<TItemsControlType,TItemContainerType> : System.Windows.Controls.ContentControl
where TItemsControlType : System.Windows.UIElement
where TItemContainerType : System.Windows.UIElement
you can find it in the silverlight toolkit.
|
|
|
|
|
Thanks, Will check this and let you know.
|
|
|
|
|
This is not available in the Windows Phone version of the toolkit.
|
|
|
|
|
I have my model in the WCF, each model representing a table in the database (they are actually based on views to make them useful). Each field is an auto property with the basic get/set (no change event).
This model is propagated to the client via the reference of the WCF. So if I want to use the model I can reference it via Service.ModelName. This works perfectly and I am happily doing all my LOB work using this structure.
However this has a number of limitations that I can find. I have no model in the client and therefore cannot implement IEditable on the model. I also don't have and OnChange events on the model fields.
So far this is not painful but I feel I am doing it wrong. However the idea that I recreate the model in the client and extend it with the interface and event capability just feels wrong, getting the data from the WCF and moving it into and out of the local models just seems too clunky for my taste.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Personally, I implement INotifyProperty on my models, then reference the models in the client. Then I instruct my WCF service reference to reuse types in all referenced assemblies. So my tiers look something like this:-
public class Employee:INotifyProperty, IDataErrorInfo
{
}
public class EmployeeDataAccess
{
}
IEmployeeService
EmployeeService
public class EmployeeViewModel
{}
public class EmployeeView
{}
Of course the client is a little more complicated than shown as it has a service manager that actually deals with data I/O and acts as a mediator between viewmodels - but that's the gist of it - and it works .
When I was a coder, we worked on algorithms. Today, we memorize APIs for countless libraries — those libraries have the algorithms - Eric Allman
|
|
|
|
|
Let me put that in words I understand!
Your model, originating in the WCF, has the full property declaration and the interface support.
There are no changes to your model (structure and additional interfaces etc) in the client.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
No the models are not in the WCF service, they are in their own library. The WCF service has a reference to the model library, and so does the client application. When you create your WCF service reference, you just ensure it reuses the referenced model library (obviously you need to reference the model library before you create the service reference). That way the service proxy is using the same models as the client app, it doesn't make it's own proxy models.
When I was a coder, we worked on algorithms. Today, we memorize APIs for countless libraries — those libraries have the algorithms - Eric Allman
|
|
|
|
|
Wayne Gaylard wrote: you just ensure it reuses the referenced model library I knew there would be a catch, this sounds simple but I'll bet there is a bunch of nasty gotchas just waiting to jump out.
You don't by any chance know of a sample set up like this that can be studied do you? And yes I'm asking to snd t codz plz
It's Friday afternoon here so I'm off to a drinking hole, you have defined what I will be doing this weekend!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
It would only take me half an hour or so to set something up. Is it alright for me to email a VS 2010 solution to you. If so just drop me an email using the email tag below and let me know your address.
When I was a coder, we worked on algorithms. Today, we memorize APIs for countless libraries — those libraries have the algorithms - Eric Allman
|
|
|
|
|
Thanks for the sample app - have a bunch of 5s in appreciation.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Thanks!
When I was a coder, we worked on algorithms. Today, we memorize APIs for countless libraries — those libraries have the algorithms - Eric Allman
|
|
|
|
|
OtherClass.Subscribe<someclass>(_ => KeepWorking = !KeepWorking);
KeepWorking is a bool
This works fine, but what is Lambda expression _ =>
Best regards
Agha Khan
|
|
|
|
|
MSDN explains Lamda Expressions here[^].
|
|
|
|