|
All you can really do, is catch any exceptions at the top level. and write them to a log. You seem to have already worked out that it relates to what OS is being used, so the question becomes, what's present in one OS and not the other, and can you install it. Might updating an IE version help ? Might updating WMP help ? ( WPF apps will just crash in XP if you have not updated the version of Windows Media Player, with a pretty meaningless error message )
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
I checked the exception log but it is meaningless. It is only throwing bad image format exception.
I removed all the images & also the reference to the images from the xaml. Still it is there.
As the exception message is not proper, it is really very difficult to find the issue from that.
Is there any other way to find & resolve the same issue? I didn't find anything...
Regards,
- Kunal
|
|
|
|
|
But Cris.... My other WPF programs are running fine on those machines. Only the said code is not running. To resolve it I created another project in VS2K8 & copied my code. That is also not working. I have not used any Windows7 reference, FYI. Please guide me....
Regards,
- Kunal
|
|
|
|
|
Chris,
That was due to different icon format. I changed the format from 4 bit to 8 bit BMP & now it is working fine...
Regards,
- Kunal Chowdhury ( My Blog)
|
|
|
|
|
Hi All,
I want to access a UIELEMENT timepicker's (which is in a datagrid column), IsEnabled attribute through C# code not the XAML.
for eaxmple a timepicker control is in the 8th column,
how can I do this
dataGrid1.Columns[8].timepicker.IsEnabled=false;
Any suugesstions?
modified on Wednesday, September 16, 2009 3:51 AM
|
|
|
|
|
I've just discovered a bit of WPF ListBox stupidity. If you have a data-bound ListBox , and you set the SelectedItem programmatically, the item you picked is indeed the selected item when the control is displayed. If you use the keyboard to move the selection, however, you find out that the focus item is the first item in the control. On your keypress, the ListBox moves the selection to the first item in the control, rather than the item before/after the previously selected item. Dumb.
Fortunately, the fix is easy. In the Loaded() handler for the container of your ListBox , add the following:
private void _Loaded(object sender, RoutedEventArgs e)
{
if (List.SelectedIndex >= 0)
{
ListBoxItem item =
(ListBoxItem)
List.ItemContainerGenerator.ContainerFromIndex(List.SelectedIndex);
item.Focus();
}
else
{
List.Focus();
}
} Note that the ListBox instance is named List in this example, and this code assumes that the ListBox has the focus when the window is loaded.
Software Zen: delete this;
|
|
|
|
|
Hi,
I am working on a silver light application. In this I have a canvas on which I will drag and drop some components (which are usercontrols and displayed beside the canvas). After placing them on the canvas if I drag them they will move to desired location on the canvas. Here my problem is that if I drag them out of this canvas they are even moving out of the canvas. But I want these components to move only inside the canvas and they should not move out of this canvas.
If anyone have any idea to fix the components to move inside the canvas please reply me.
Thanks in advance.
|
|
|
|
|
If you are using Silverlight 3 use built in MouseDragElementBehavior for Dragging a control and set ConstrainToParentBounds to true.This is more easier than manual adjustment of left and top attributes inside a canvas.
|
|
|
|
|
Hi Arun Jacob,
Thanks for your reply.
I tried to implement this in my solution. I tried to set ConstrainToParentBounds to true for my usercontrols such that these usercontrols will not move out of the canvas when I place them on the canvas in the MainPage.xaml. But I am unable to get this property for my user control.
Please reply me how I have to set this property for a usercontrol.
Thanks in advance.
|
|
|
|
|
Hi I have Visual Studio Team System 2008..I want to develop Silverlight applications.Is it possible to install silverlight controls?If not what to do?
CC26
|
|
|
|
|
|
First of all Thank you so much for your reply..
I tried to install the same,but it asks for Visual Studio .Net 2008 SP1.While I have Visual Studio Team System 2008.
CC26
|
|
|
|
|
|
will it install the full visual studio 2008 or only servece pack 1....I already have visual studio team system 2008.I meant to say...is there any way to upgrade visual studio teamsystem 2008 to visual studio 2008 servicepack1?
CC26
|
|
|
|
|
The link doing the same it'll upgrade to SP1.
|
|
|
|
|
Any solution of where retrieve the data from 2 different table in a Form?
just like
first table :- UserID,Password
Second table :- Designation
plz reply hurry!!!!!!!!
|
|
|
|
|
This is nothing to do with Silverlight.BTW just right a query to join two tables and use an Entity to pouplate with that data.
|
|
|
|
|
how 2 install silverlight without visual studio 2008 sp1?
plz reply hurry!!!
|
|
|
|
|
|
Hello,
I have this class:
public class GameObject : ObservableCollection<Property>
{
public string Name { get; set; }
public override string ToString()
{
return Name;
}
}
Property is my own class.
When I add it to a ListBox it does not call the ToString() method but rather just shows (Collection) in the list box.
Isnt that a bug? At least seems weird to me. I do not want to change the class heirarchy from inheritance to composition for this problem but if I do not have a choice ill do it.
|
|
|
|
|
It's not a bug. You need to supply a template that tells the listbox what to display. Off the top of my head, this is what you'd expect to put into the XAML:
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2006"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"
x:Class="GameSampleApp.Window1"
x:Name="Window"
Title="Sample App"
Width="380" Height="240">
<Window.Resources>
<Style TargetType="ListBox">
<Setter Property="Control.FontFamily" Value="Tahoma" />
<Setter Property="Control.FontSize" Value="10" />
</Style>
<Style x:Key="FontStyle">
<Setter Property="Control.FontFamily" Value="Verdana" />
<Setter Property="Control.FontStyle" Value="Italic" />
<Setter Property="Control.FontSize" Value="12"/>
</Style>
<DataTemplate x:Key="GamePersonTemplate">
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<TextBlock Width="40" Grid.Column="0"
Text="{Binding Name, Mode=OneWay}" />
</Grid>
</DataTemplate>
</Window.Resources>
<Grid x:Name="LayoutRoot">
<ListBox Padding="3" HorizontalAlignment="Left" Width="Auto"
ItemTemplate="{DynamicResource GamePersonTemplate}"
ItemsSource="{Binding}" VerticalAlignment="Top" Height="Auto"/>
</Grid>
</Window> You'll obviously need to hook your GameObject into the DataContext.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Off the top of your head ; we are not worthy.
|
|
|
|
|
I do this everyday - this code was easy. Josh Smith's code - now that's hard.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Hi to all,...
As a academic project, I want to design an website similar to Orkut.com in silverlight....Could anyone please give me some idea or hints on it?
Please give a clue on the dynamism of this kind of websites....how they achieve it?....how once a person logged in , can see his all scraps...is it under that user name, all the scraps are being stored....?....Now if a person changes his photo, the scrapbook on others account also changes the photo....
Basically i need an idea of how they work exactly
Thanks in advance
-----------------------------
I am a beginner
|
|
|
|
|
I would say that if you are a beginner, it would be the best if you can start working on small project instead of trying for something that is built by Google. Why don't you try simple Data Entey Form, Form authentication and etc first?
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
Microsoft MVP (Silverlight), WPF/Silverlight Insiders
|
|
|
|