[OzSilverlight] SL Combobox problem.?

2008-11-01 Thread Muhammad Niaz
Hi All,

 

   I have a Combobox in SL App when I remove item from the collection
(ObservableCollectionUserDTO/List UserDTO ) work fine,  but the issue
that Combobox not update its items-Containing area when its bind with
ObservableCollection, mean if there were 4 items in Combobox then will
remain 3 but total space of items-Containing remain 4. And but when its bind
to List then it only delete the item from collection but not from Combobox
area, mean if there were 4 items in Combobox then will remain even 4.

why, here is some code:

 

XAML:

ComboBox x:Name=ddlUser Canvas.ZIndex=2 Grid.Row=0 Grid.Column=1

  DisplayMemberPath=name

  ToolTipService.ToolTip=Select user.
Style={StaticResource NormalDropDownListStyle} /

CS:

private ObservableCollectionUserDTO resultUserDTO = new
ObservableCollectionUserDTO();

private ListUserDTO resultUserDTO = new ListUserDTO();

 

 

 

also why should I use List over ObservableCollection.?

Enen though I call this like,

ddlUser.UpdateLayout();

ddlUser.SelectedItem = innerUserDTO;

 

Thanks  Regards,

Muhammad Niaz

Software Engineer

Intagleo Systems Pvt Ltd

www.intagleo.co.uk


 




--- 
OzSilverlight.com - to unsubscribe from this list, send a message back to the 
list with 'unsubscribe' as the subject.
Powered by mailenable.com - List managed by www.readify.net


[OzSilverlight] SL Fonts.?

2008-11-01 Thread Muhammad Niaz
Hi can anybody tell me how to get default Fonts  that are available in SL2
using foreach, mean to populate Combobox or any control dynamically.?

 

 

Thanks  Regards,

Muhammad Niaz

Software Engineer

Intagleo Systems Pvt Ltd

www.intagleo.co.uk

 




--- 
OzSilverlight.com - to unsubscribe from this list, send a message back to the 
list with 'unsubscribe' as the subject.
Powered by mailenable.com - List managed by www.readify.net


Re: [OzSilverlight] SL Fonts.?

2008-11-01 Thread ross jempson
It can be done in WPF but the same class doesn't seem to exist in Silverlight

eg. Here is an example

 Window.Resources
DataTemplate x:Key=FontTemplate
  StackPanel Orientation=Horizontal
Border BorderThickness=1 BorderBrush=Black Margin=10
TextBlock FontFamily={Binding Source}
Text=Sample Text Margin=5 /
/Border
TextBlock Text={Binding Source} VerticalAlignment=Center /
/StackPanel
/DataTemplate
  /Window.Resources

  ListBox x:Name=fonts ItemTemplate={StaticResource FontTemplate} /


 And in code :

fonts.ItemsSource = System.Windows.Media.Fonts.SystemFontFamilies;


On Sat, Nov 1, 2008 at 11:18 PM, Muhammad Niaz [EMAIL PROTECTED] wrote:
 Hi can anybody tell me how to get default Fonts  that are available in SL2
 using foreach, mean to populate Combobox or any control dynamically.?





 Thanks  Regards,

 Muhammad Niaz

 Software Engineer

 Intagleo Systems Pvt Ltd

 www.intagleo.co.uk



 ---
 OzSilverlight.com - to unsubscribe from this list, send a message back to
 the list with 'unsubscribe' as the subject.
 Powered by mailenable.com - List managed by www.readify.net


--- 
OzSilverlight.com - to unsubscribe from this list, send a message back to the 
list with 'unsubscribe' as the subject.
Powered by mailenable.com - List managed by www.readify.net




RE: [OzSilverlight] SL Fonts.?

2008-11-01 Thread Miguel Madero
Muhammad, 

I'm not sure you could get that info directly from SL, but you can look for the 
appropriate function in JS and call it from SL.

If you depend on a certain font you can include them in a zip file and get them 
through a request and create a FontSource object using the stream. This is part 
of SL docs

Downloading Fonts
Silverlight does not include any fonts in its installation package. If you want 
to use a font for a TextBlock or TextBox element that is not on the list of 
supported local fonts, you can specify the font in XAML by using the FontFamily 
property, or in code using the FontSource property. The FontFamily property can 
specify a single font file or a zip file containing font files. In either case, 
the file must be embedded in a DLL as a resource. When using FontSource, your 
code can load the font (or zip of fonts) from a stream such as isolated 
storage. 




 Miguel A. Madero Reyes
 www.miguelmadero.com (blog)
 [EMAIL PROTECTED] 
 +61 (0) 406-704-161
 623/243 Pyrmont Street 
 Pyrmont, NSW, 2009
 Australia
 Please reconsider your environmental responsibility before printing this 
e-mail
The information in this e-mail is confidential and may be legally privileged. 
It is intended solely for the addressee. If you are not the intended recipient, 
any disclosure, copying, distribution or any action taken or omitted to be 
taken in reliance on it, is prohibited and may be unlawful.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Muhammad Niaz
Sent: Sunday, 2 November 2008 2:18 AM
To: listserver@ozSilverlight.com
Subject: RE: [OzSilverlight] SL Fonts.?

Thanks Ross 
:)


Thanks  Regards,
Muhammad Niaz
Software Engineer
Intagleo Systems Pvt Ltd
www.intagleo.co.uk

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of ross jempson
Sent: Saturday, November 01, 2008 7:22 PM
To: listserver@ozSilverlight.com
Subject: Re: [OzSilverlight] SL Fonts.?

It can be done in WPF but the same class doesn't seem to exist in
Silverlight

eg. Here is an example

 Window.Resources
DataTemplate x:Key=FontTemplate
  StackPanel Orientation=Horizontal
Border BorderThickness=1 BorderBrush=Black Margin=10
TextBlock FontFamily={Binding Source}
Text=Sample Text Margin=5 /
/Border
TextBlock Text={Binding Source} VerticalAlignment=Center /
/StackPanel
/DataTemplate
  /Window.Resources

  ListBox x:Name=fonts ItemTemplate={StaticResource FontTemplate} /


 And in code :

fonts.ItemsSource = System.Windows.Media.Fonts.SystemFontFamilies;


On Sat, Nov 1, 2008 at 11:18 PM, Muhammad Niaz [EMAIL PROTECTED]
wrote:
 Hi can anybody tell me how to get default Fonts  that are available in SL2
 using foreach, mean to populate Combobox or any control dynamically.?





 Thanks  Regards,

 Muhammad Niaz

 Software Engineer

 Intagleo Systems Pvt Ltd

 www.intagleo.co.uk



 ---
 OzSilverlight.com - to unsubscribe from this list, send a message back to
 the list with 'unsubscribe' as the subject.
 Powered by mailenable.com - List managed by www.readify.net


---
OzSilverlight.com - to unsubscribe from this list, send a message back to
the list with 'unsubscribe' as the subject.
Powered by mailenable.com - List managed by www.readify.net







--- 
OzSilverlight.com - to unsubscribe from this list, send a message back to the 
list with 'unsubscribe' as the subject.
Powered by mailenable.com - List managed by www.readify.net




--- 
OzSilverlight.com - to unsubscribe from this list, send a message back to the 
list with 'unsubscribe' as the subject.
Powered by mailenable.com - List managed by www.readify.net




RE: [OzSilverlight] SL Combobox problem.?

2008-11-01 Thread Miguel Madero
The ObservableCollection (or any collection that implements
ICollectionChange) exposes an event (CollectionChanged) and the Databinding
will subscribe to this to monitor changes in the collection, when one occur
it will cause the control to refresh it's datasource.  

 

This is similar to objects that implement INotifyPropertyChange, those will
expose a PropertyChanged event that will trigger an update in the UI
whenever the control value of the property changed (or more precisely when
the event is fired)

 

 

 

 Miguel A. Madero Reyes

  http://www.miguelmadero.com/ www.miguelmadero.com (blog)
  mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] 
 +61 (0) 406-704-161

 623/243 Pyrmont Street 
 Pyrmont, NSW, 2009

 Australia

P Please reconsider your environmental responsibility before printing this
e-mail

The information in this e-mail is confidential and may be legally
privileged. It is intended solely for the addressee. If you are not the
intended recipient, any disclosure, copying, distribution or any action
taken or omitted to be taken in reliance on it, is prohibited and may be
unlawful.

 

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Muhammad Niaz
Sent: Saturday, 1 November 2008 10:58 PM
To: listserver@ozSilverlight.com
Subject: [OzSilverlight] SL Combobox problem.?

 

Hi All,

 

   I have a Combobox in SL App when I remove item from the collection
(ObservableCollectionUserDTO/List UserDTO ) work fine,  but the issue
that Combobox not update its items-Containing area when its bind with
ObservableCollection, mean if there were 4 items in Combobox then will
remain 3 but total space of items-Containing remain 4. And but when its bind
to List then it only delete the item from collection but not from Combobox
area, mean if there were 4 items in Combobox then will remain even 4.

why, here is some code:

 

XAML:

ComboBox x:Name=ddlUser Canvas.ZIndex=2 Grid.Row=0 Grid.Column=1

  DisplayMemberPath=name

  ToolTipService.ToolTip=Select user.
Style={StaticResource NormalDropDownListStyle} /

CS:

private ObservableCollectionUserDTO resultUserDTO = new
ObservableCollectionUserDTO();

private ListUserDTO resultUserDTO = new ListUserDTO();

 

 

 

also why should I use List over ObservableCollection.?

Enen though I call this like,

ddlUser.UpdateLayout();

ddlUser.SelectedItem = innerUserDTO;

 

Thanks  Regards,

Muhammad Niaz

Software Engineer

Intagleo Systems Pvt Ltd

www.intagleo.co.uk


 

---
OzSilverlight.com - to unsubscribe from this list, send a message back to
the list with 'unsubscribe' as the subject.
Powered by mailenable.com - List managed by www.readify.net 




--- 
OzSilverlight.com - to unsubscribe from this list, send a message back to the 
list with 'unsubscribe' as the subject.
Powered by mailenable.com - List managed by www.readify.net


Re: [OzSilverlight] SL Error.?

2008-11-01 Thread .net noobie
Remarks

ArgumentOutOfRangeException is thrown when a method is invoked and at least
one of the arguments passed to the method is not nullNothingnullptra null
reference (Nothing in Visual Basic) and does not contain a valid value.

ArgumentOutOfRangeException is used extensively by:

   -

   Classes in the System.Collections and System.IO namespaces.
   -

   The Array class.

ArgumentOutOfRangeException behaves identically to ArgumentException. It is
provided so that application code can differentiate between
exceptionscaused by invalid
arguments that are not nullNothingnullptra null reference (Nothing in Visual
Basic), and exceptions caused by null arguments. For errors caused by null
arguments, see ArgumentNullException.

For a list of initial property values for an instance of
ArgumentOutOfRangeException, see the ArgumentOutOfRangeExceptionconstructors.



On Sun, Nov 2, 2008 at 11:40 AM, .net noobie [EMAIL PROTECTED] wrote:

 it sounds like your code is trying to read a value from somewhere that is
 not populated yet...? e.g. a combox or somthing..? or something like that, 
 this
 is only a guess really, it is a bit hard to say without seeing the code
 really.

 On Sun, Nov 2, 2008 at 3:29 AM, Muhammad Niaz [EMAIL PROTECTED]wrote:

  Hi All,

  These days I am working on SL App where lot of Combos working; and they
 are disturbing me very much L. PFA for detailed understanding,

 Here is the detailed scenario,

 When I click on any radio button then the parent DDL filled, when I click
 on any other radio everything work fine, mean parent DDL populate finaly
 J,

 Here it give me this error :

 An unhandled exception(Unhandled Error in Silverlight 2 Application
 Code:4004 Category ManagedRuntimeError Message: system.Argument exception:
 Value does not fall within the expected range)



 When I click on any item on Patent DDL, then I click on any radio button,
 What is the reason,

 Help me simple ASAP. ;)





 Thanks  Regards,

 Muhammad Niaz

 Software Engineer

 Intagleo Systems Pvt Ltd

 www.intagleo.co.uk


  ---
 OzSilverlight.com - to unsubscribe from this list, send a message back to
 the list with 'unsubscribe' as the subject.
 Powered by mailenable.com - List managed by www.readify.net




 --
 .net noobie™

 ==
 What is the 'Clean Feed'?

 The Australian Federal Government is pushing forward with a plan to force
 Internet Service Providers [ISPs] to censor the Internet for all
 Australians. This plan will waste tens of millions of taxpayer dollars and
 slow down Internet access.

 Despite being almost universally condemned by the public, ISPs, State
 Governments, Media and censorship experts, Communications Minister Stephen
 Conroy is determined to force this filter into your home.

 http://nocleanfeed.com/




-- 
.net noobie™

==
What is the 'Clean Feed'?

The Australian Federal Government is pushing forward with a plan to force
Internet Service Providers [ISPs] to censor the Internet for all
Australians. This plan will waste tens of millions of taxpayer dollars and
slow down Internet access.

Despite being almost universally condemned by the public, ISPs, State
Governments, Media and censorship experts, Communications Minister Stephen
Conroy is determined to force this filter into your home.

http://nocleanfeed.com/



--- 
OzSilverlight.com - to unsubscribe from this list, send a message back to the 
list with 'unsubscribe' as the subject.

Powered by mailenable.com - List managed by www.readify.net