|
No the SL Datagrid does not have a maximum limit.
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.
My latest tip/trick
|
|
|
|
|
|
This[^] one, and please don't shout.
|
|
|
|
|
Hey Guys,
I've written a few silverlight apps thus far primarily using RIA services and the entity framework. We're currently looking at marrying some of our ruby on rails applications possibly through exposed web services and comsuming those services with silverlight. I've found some examples mainly using iron ruby which seems to be shelved for the time being. My question is, has anyone tried this? Is it possible to consume ruby on rails services via silverlight possibly just through consuming a rest service? I really appreciate your thoughts and opinions as we're evaluating options.
Regards,
Ryan
|
|
|
|
|
Hi,
I'm not sure if this is a repost but since I could't find a reference to this video I found and replicated to see if it worked (it did) I want to post a link to this MVVM in WPF and Silverlight
sample (8 video sessions in total) that I think can be of great help for those who don't know this sample and are trying to get MVVM working.
When recreating this sample (source code is available for download) it's important to think about the using directives since it's not alway's clear that these are added while watching the video.
[Link]
With friendly greetings,
Eric Goedhart
modified on Saturday, January 22, 2011 10:27 AM
|
|
|
|
|
It might be more helpful if you post this as a tip/trick rather than in the question answer forum.
It will get lost here.
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.
My latest tip/trick
|
|
|
|
|
Thanks in advance.
Getting this Error in Visual Studio 2008 Silver Light Application
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
when Clicking on the Page of the Project any suggestion/help will be appreciated
SOFTDEV
Luck in life always exists in the form of an abstract class that cannot be instantiated directly and needs to be inherited by hard work and dedication.
|
|
|
|
|
This error appeared randomly back when I was using VS 2008, but now that we switched to VS 2010 the problem never re-appeared.
This is nearly certainly an internal exception of VS 2008, so it has nothing to do with what you are doing. Some people report this error[^] when there is mismatch in Silverlight versions (3 vs. 4). Some people report fixing a similar problem by resetting import/export settings[^], but I don't know if it is going to work for you.
|
|
|
|
|
I created a list of RadioButtons in a template. Multiple instances will be created for the template. Therefore the GroupName of the RadioButton can’t be the same for each instance. My approach is to use Guid.NewGuid in XAML. However, I can’t workout the syntax of it. I found a post about it but it doesn’t work. Any idea? Or any other idea to make GroupName works for multiple instances? Thanks in Advance!
|
|
|
|
|
Hi All,
I want to iterate all the rows of the DataGrid in my SilverLight web application..
Can anyone tell me how to iterate?
I have googled, but no luck....
Thanks,
Sunil G.
|
|
|
|
|
The usual way is not to work against the rows, but rather to work against the underlying data. With Silverlight and WPF it pays to stop thinking in the old ways of doing things, and embrace the rich databinding support along with a pattern such as MVVM.
|
|
|
|
|
I found an exception to that particular rule. There does not seem to be a reasonable way to bind the SelectedItems of the gridview, I'm iterating them in the code behind and stuffing a list<> in the viewmodel.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
You could do it by having an
IsSelected property and update that if it's selected.
|
|
|
|
|
Sunil G 3 wrote: I have googled, but no luck....
Thats b/c is is WRONG, as Pete suggested use the underlying data collection
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I have several pairs of TextBlock and an Image next to each other. OnMouseLeftButtonDown I want to modify the TextBlock. That is some standard situation, but in this case I don't want to add an EventHandler to each image as there are many of them.
How can I user only one Handler and change the corresponding TextBlock. I've tried to add some DataContext to the image but it did not work out.
Can anyone give me some help?
Thanks!
|
|
|
|
|
You can use the Tag tag to store additional info with your images, for example:
<Image Tag="textbox1" MouseLeftButtonDown="Image_MouseLeftButtonDown" />
<Image Tag="textbox2" MouseLeftButtonDown="Image_MouseLeftButtonDown" /> Now you can access the tag in your event handler, and act based on its value:
private void Image_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) {
var textboxName = ((Image) sender).Tag;
}
|
|
|
|
|
Hi dasblinkenlight,
thank you for your reply. This might be a solution. Would be great to access the textbox directly when an event is fired. Otherwise I need to put all textboxes in an array or not?
I thought of something like this below.
<TextBox x:Name="UserNameTB" />
<TextBox x:Name="AddressTB" />
<Image Source="..." MouseLeftButtonDown="editText_MouseLeftButtonDown" Tag="{UserNameTB}"/>
<Image Source="..." MouseLeftButtonDown="editText_MouseLeftButtonDown" Tag="{AddressTB}"/>
Is it possible to access it like this??
TextBox userNameTB = ((sender as Image).Tag) as TextBox);
Tried some combinations but with no luck.
Greets
Adrian
|
|
|
|
|
Yes, that trick ought to work! I verified that your code works with a slightly modified XAML (I used SilverLight 4):
<Image Source="..." MouseLeftButtonDown="editText_MouseLeftButtonDown" Tag="{Binding ElementName=UserNameTB}"/>
<Image Source="..." MouseLeftButtonDown="editText_MouseLeftButtonDown" Tag="{Binding ElementName=AddressTB}"/>
|
|
|
|
|
If I were doing this, I'd have a collection containing the details of the image, and a text item representing the text you want to display in the TextBlock. Then, I'd bind to this using something like a ListView.
In other words, I'd use MVVM to cope with this. I suggest that you have a look into this, and simplify the problem hugely.
|
|
|
|
|
|
Sounds like a newbie question. But can't help my self for already an hour.
I've Silverlight application with tabs and don't want to put all code in one large file. So I have made single UserControls and now I want to put them into the tab control.
<telerik:RadWindow xmlns:my="clr-namespace:UserEditorApp" x:Class="UserEditorApp.UserDetailsWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" Height="500" Width="750" Header="User details">
<Grid>
<StackPanel Orientation="Vertical">
<telerik:RadTabControl x:Name="rowDetailsTabControl" ReorderTabRows="False" >
<!-- User Details tab -->
<telerik:RadTabItem x:Name="UserDetailsTab" Header="Benutzer Details">
<StackPanel>
<my:UDW_Details /> <!-- how can I add the control here? -->
</StackPanel>
</telerik:RadTabItem>
</telerik:RadTabControl>
<StackPanel>
</Grid>
</telerik:RadWindow>
I can't see anything in the designer. Can somebody help me out of this?
Thanks!
modified on Thursday, January 20, 2011 8:43 AM
|
|
|
|
|
StackPanels size to the size of the content. In your case, the size is 0x0, so you don't see anything.
You need to have your d namespace defined in the my:UDW_Details XAML and then add:
d:DesignWidth="300" d:DesignHeight="300"
to have a design time width and height.
or you can stub in design time data. Either way works.
|
|
|
|
|
NOW I AM DEVELOPING WPF APPLICATION.THIS APPLICATION I AM USING A ACCORDION CONTROL.IN FIRST TIME I FILL DATA IN IT.AFTER THIS, I WANT FILL NEW DATA TO IT .BUT I CAN"NT FILL TO IT. so please give your subsections
thanks and regards
|
|
|
|
|
1) Dont shout.
2) You can do this. Loop through the items inside an accordion and then remove items from it (or add new items to it).
Sample here[^].
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.
My latest tip/trick
|
|
|
|
|
I have a treeview with a Template
The treeviewitem has an event handler. I want to access the parent treeviewitem from here. How can I achieve this.
End Goal - User can select a node and delete it.
Template
<br />
<sdk:HierarchicalDataTemplate x:Key="TreeViewMainReadTemplate" ItemsSource="{Binding Children}"><br />
<TextBlock Text="{Binding Text,Mode=TwoWay}" <br />
MouseLeftButtonDown="TreeViewMain_MouseLeftButtonDown"></TextBlock><br />
</sdk:HierarchicalDataTemplate><br />
TreeView
<br />
<sdk:TreeView Name="TreeViewMain" <br />
ItemTemplate="{StaticResource TreeViewMainReadTemplate}" <br />
Width="400" Height="400" ><br />
</sdk:TreeView><br />
Event Handler Where I want to access parent
<br />
private void TreeViewMain_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)<br />
{<br />
}<br />
Binding Data Class
<br />
public class Node<br />
{<br />
private String text;<br />
private ObservableCollection<Node> children;<br />
public ObservableCollection<Node> Children<br />
{<br />
get{ return children;}<br />
set{ children = value;}<br />
}<br />
<br />
public String Text { get { return text; } set { text = value; } }<br />
<br />
public Node(String text)<br />
{<br />
Children = new ObservableCollection<Node>();<br />
Text = text;<br />
}<br />
<br />
public void Add(Node node)<br />
{<br />
children.Add(node); <br />
NotifyPropertyChanged("Children");<br />
}<br />
<br />
public void Delete(Node node)<br />
{<br />
children.Remove(node);<br />
NotifyPropertyChanged("Children");<br />
}<br />
<br />
public event PropertyChangedEventHandler PropertyChanged;<br />
<br />
private void NotifyPropertyChanged(String info)<br />
{<br />
if (PropertyChanged != null)<br />
{<br />
PropertyChanged(this, new PropertyChangedEventArgs(info));<br />
}<br />
}<br />
}<br />
|
|
|
|