<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Silverlight 2 (beta1): International (Non-US) TextBox</title>
	<atom:link href="http://michaelsync.net/2008/04/07/silverlight-2-beta1-international-non-us-textbox/feed" rel="self" type="application/rss+xml" />
	<link>http://michaelsync.net/2008/04/07/silverlight-2-beta1-international-non-us-textbox</link>
	<description>Sharing our knowledge</description>
	<lastBuildDate>Thu, 04 Mar 2010 13:05:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Presad Pathak</title>
		<link>http://michaelsync.net/2008/04/07/silverlight-2-beta1-international-non-us-textbox/comment-page-2#comment-96933</link>
		<dc:creator>Presad Pathak</dc:creator>
		<pubDate>Wed, 27 Aug 2008 13:57:00 +0000</pubDate>
		<guid isPermaLink="false">http://michaelsync.net/2008/04/07/silverlight-2-beta1-international-non-us-textbox#comment-96933</guid>
		<description>Hi, All
I am using this international text box in my app.......
- I am not able to use delete key when if i select with shift key pressed and then delete key presses not deleting ......
- Not working on mac and if i want that text box to be used for password .....

Will any one suggest me ....... its urgent......

Thanx in advance........</description>
		<content:encoded><![CDATA[<p>Hi, All<br />
I am using this international text box in my app&#8230;&#8230;.<br />
- I am not able to use delete key when if i select with shift key pressed and then delete key presses not deleting &#8230;&#8230;<br />
- Not working on mac and if i want that text box to be used for password &#8230;..</p>
<p>Will any one suggest me &#8230;&#8230;. its urgent&#8230;&#8230;</p>
<p>Thanx in advance&#8230;&#8230;..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: quintorel</title>
		<link>http://michaelsync.net/2008/04/07/silverlight-2-beta1-international-non-us-textbox/comment-page-2#comment-92566</link>
		<dc:creator>quintorel</dc:creator>
		<pubDate>Wed, 13 Aug 2008 21:03:27 +0000</pubDate>
		<guid isPermaLink="false">http://michaelsync.net/2008/04/07/silverlight-2-beta1-international-non-us-textbox#comment-92566</guid>
		<description>Hi, 

with this code I achieve that works ctrol+c ctrol+v and ctrol+x:



 void ExtendedTextBox_KeyDown(object sender, KeyEventArgs e)
        {
            e.Handled = true;
            
            String Value = Keyboard.HandleKeyDown(sender, e);

            //if (AcceptTabs &amp;&amp; (e.Key == Key.Tab))
            //{
            //    Value = &quot;\t&quot;; // a plain tab is not displayed correctly, so we use multiple spaces...

            //    Focus();
            //}

            //Si es una tecla especial (Por aqui tb pasan las de los acentos)
            if (Value.Length == 0)
            {
                //Switch es la forma más eficiente de hacer esto
                switch (e.Key)
                {
                    case Key.Delete:
                        {
                            e.Handled = false;
                            break;
                        }
                    //Inicio
                    case Key.Home:
                        {
                            e.Handled = false;
                            break;
                        }
                    case Key.PageDown:
                        {
                            e.Handled = false;
                            break;
                        }
                    case Key.PageUp:
                        {
                            e.Handled = false;
                            break;
                        }
                    case Key.End:
                        {
                            e.Handled = false;
                            break;
                        }
                    case Key.Left:
                        {
                            e.Handled = false;
                            break;
                        }
                    case Key.Right:
                        {
                            e.Handled = false;
                            break;
                        }
                    case Key.Down:
                        {
                            e.Handled = false;
                            break;
                        }
                    case Key.Up:
                        {
                            e.Handled = false;
                            break;
                        }
                    //Hay que poner esto para que se lancen los eventos del intro
                    case Key.Enter:
                        {
                            e.Handled = false;
                            break;
                        }
                    case Key.Back:
                        {
                            e.Handled = false;
                            break;
                        }
                    case Key.Insert:
                        {
                            e.Handled = false;
                            break;
                        }
                    case Key.Escape:
                        {
                            e.Handled = false;
                            break;
                        }
                    //Necesario
                    case Key.Space:
                        {
                            e.Handled = false;
                            break;
                        }
                    //Necesario para que funcione el TAB
                    case Key.Tab:
                        {
                            e.Handled = false;
                            break;
                        }
                    //Para Ctrl+C Ctrol+V Ctrol+X
                    //case Key.Ctrl:
                    //    {
                    //        e.Handled = false;
                    //        break;
                    //    }
                    case Key.C:
                        {
                            e.Handled = false;
                            break;
                        }
                    case Key.X:
                        {
                            e.Handled = false;
                            break;
                        }
                    case Key.V:
                        {
                            e.Handled = false;
                            break;
                        }
                        
                   
                }

                if ((e.Key == Key.Back) &amp;&amp; (m_SelectionLength &lt; 1))
                    m_SelectionIndex--;

                if (IsPassword)
                {
                    // handle selection removal of more than one character per time...
                    if (Text.Length &lt; m_Protected.Length)
                    {
                        m_Protected = m_Protected.Substring(0, m_SelectionIndex) +
                            m_Protected.Substring(m_SelectionIndex + Math.Max(1, m_SelectionLength));

                        m_SelectionIndex = Math.Min(m_SelectionIndex, Text.Length);
                        m_SelectionLength = 0;
                    }
                }

                return;
            }

            UpdateText(Value);
        }



Practically, i have do the next:

if (Value == &quot;&quot;) and (Key == V) is because the key &quot;V&quot; don&#039;t produce values and is because any other key is pressed.
In this case,  e.Handled = false.
And copy, cut and paste perfectly.

Only there are any bug, that the cursor don&#039;t go to the final of the pasted text, it stay at start of the text pasted.

Any suggest Chris??

Thanks</description>
		<content:encoded><![CDATA[<p>Hi, </p>
<p>with this code I achieve that works ctrol+c ctrol+v and ctrol+x:</p>
<p> void ExtendedTextBox_KeyDown(object sender, KeyEventArgs e)<br />
        {<br />
            e.Handled = true;</p>
<p>            String Value = Keyboard.HandleKeyDown(sender, e);</p>
<p>            //if (AcceptTabs &amp;&amp; (e.Key == Key.Tab))<br />
            //{<br />
            //    Value = &#8220;\t&#8221;; // a plain tab is not displayed correctly, so we use multiple spaces&#8230;</p>
<p>            //    Focus();<br />
            //}</p>
<p>            //Si es una tecla especial (Por aqui tb pasan las de los acentos)<br />
            if (Value.Length == 0)<br />
            {<br />
                //Switch es la forma más eficiente de hacer esto<br />
                switch (e.Key)<br />
                {<br />
                    case Key.Delete:<br />
                        {<br />
                            e.Handled = false;<br />
                            break;<br />
                        }<br />
                    //Inicio<br />
                    case Key.Home:<br />
                        {<br />
                            e.Handled = false;<br />
                            break;<br />
                        }<br />
                    case Key.PageDown:<br />
                        {<br />
                            e.Handled = false;<br />
                            break;<br />
                        }<br />
                    case Key.PageUp:<br />
                        {<br />
                            e.Handled = false;<br />
                            break;<br />
                        }<br />
                    case Key.End:<br />
                        {<br />
                            e.Handled = false;<br />
                            break;<br />
                        }<br />
                    case Key.Left:<br />
                        {<br />
                            e.Handled = false;<br />
                            break;<br />
                        }<br />
                    case Key.Right:<br />
                        {<br />
                            e.Handled = false;<br />
                            break;<br />
                        }<br />
                    case Key.Down:<br />
                        {<br />
                            e.Handled = false;<br />
                            break;<br />
                        }<br />
                    case Key.Up:<br />
                        {<br />
                            e.Handled = false;<br />
                            break;<br />
                        }<br />
                    //Hay que poner esto para que se lancen los eventos del intro<br />
                    case Key.Enter:<br />
                        {<br />
                            e.Handled = false;<br />
                            break;<br />
                        }<br />
                    case Key.Back:<br />
                        {<br />
                            e.Handled = false;<br />
                            break;<br />
                        }<br />
                    case Key.Insert:<br />
                        {<br />
                            e.Handled = false;<br />
                            break;<br />
                        }<br />
                    case Key.Escape:<br />
                        {<br />
                            e.Handled = false;<br />
                            break;<br />
                        }<br />
                    //Necesario<br />
                    case Key.Space:<br />
                        {<br />
                            e.Handled = false;<br />
                            break;<br />
                        }<br />
                    //Necesario para que funcione el TAB<br />
                    case Key.Tab:<br />
                        {<br />
                            e.Handled = false;<br />
                            break;<br />
                        }<br />
                    //Para Ctrl+C Ctrol+V Ctrol+X<br />
                    //case Key.Ctrl:<br />
                    //    {<br />
                    //        e.Handled = false;<br />
                    //        break;<br />
                    //    }<br />
                    case Key.C:<br />
                        {<br />
                            e.Handled = false;<br />
                            break;<br />
                        }<br />
                    case Key.X:<br />
                        {<br />
                            e.Handled = false;<br />
                            break;<br />
                        }<br />
                    case Key.V:<br />
                        {<br />
                            e.Handled = false;<br />
                            break;<br />
                        }</p>
<p>                }</p>
<p>                if ((e.Key == Key.Back) &amp;&amp; (m_SelectionLength &lt; 1))<br />
                    m_SelectionIndex&#8211;;</p>
<p>                if (IsPassword)<br />
                {<br />
                    // handle selection removal of more than one character per time&#8230;<br />
                    if (Text.Length &lt; m_Protected.Length)<br />
                    {<br />
                        m_Protected = m_Protected.Substring(0, m_SelectionIndex) +<br />
                            m_Protected.Substring(m_SelectionIndex + Math.Max(1, m_SelectionLength));</p>
<p>                        m_SelectionIndex = Math.Min(m_SelectionIndex, Text.Length);<br />
                        m_SelectionLength = 0;<br />
                    }<br />
                }</p>
<p>                return;<br />
            }</p>
<p>            UpdateText(Value);<br />
        }</p>
<p>Practically, i have do the next:</p>
<p>if (Value == &#8220;&#8221;) and (Key == V) is because the key &#8220;V&#8221; don&#8217;t produce values and is because any other key is pressed.<br />
In this case,  e.Handled = false.<br />
And copy, cut and paste perfectly.</p>
<p>Only there are any bug, that the cursor don&#8217;t go to the final of the pasted text, it stay at start of the text pasted.</p>
<p>Any suggest Chris??</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: quintorel</title>
		<link>http://michaelsync.net/2008/04/07/silverlight-2-beta1-international-non-us-textbox/comment-page-2#comment-92557</link>
		<dc:creator>quintorel</dc:creator>
		<pubDate>Wed, 13 Aug 2008 19:58:54 +0000</pubDate>
		<guid isPermaLink="false">http://michaelsync.net/2008/04/07/silverlight-2-beta1-international-non-us-textbox#comment-92557</guid>
		<description>Hi,

I detect a bug in InternationalTextBox class:

void ExtendedTextBox_TextChanged(object sender, TextChangedEventArgs e)
        {
            if (m_SelectionIndex &lt; 0)
                SelectionStart = 0;
            else
                SelectionStart = m_SelectionIndex;
        }

On TextChanged methos we have to control if m_SelectionIndex is less than zero. 
Sometimes fail it, if don&#039;t control.

For Example. Write in TextBox &quot;Hi, my name is Jose&quot; and with the mouse put the cursor in comma and Back(remove) &quot;Hi,&quot;, just then press DELETE and fail.

Regards!!!</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I detect a bug in InternationalTextBox class:</p>
<p>void ExtendedTextBox_TextChanged(object sender, TextChangedEventArgs e)<br />
        {<br />
            if (m_SelectionIndex &lt; 0)<br />
                SelectionStart = 0;<br />
            else<br />
                SelectionStart = m_SelectionIndex;<br />
        }</p>
<p>On TextChanged methos we have to control if m_SelectionIndex is less than zero.<br />
Sometimes fail it, if don&#8217;t control.</p>
<p>For Example. Write in TextBox &#8220;Hi, my name is Jose&#8221; and with the mouse put the cursor in comma and Back(remove) &#8220;Hi,&#8221;, just then press DELETE and fail.</p>
<p>Regards!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Sync &#187; Silverlight 2 beta2 - Samples Updated</title>
		<link>http://michaelsync.net/2008/04/07/silverlight-2-beta1-international-non-us-textbox/comment-page-2#comment-89708</link>
		<dc:creator>Michael Sync &#187; Silverlight 2 beta2 - Samples Updated</dc:creator>
		<pubDate>Mon, 04 Aug 2008 07:36:07 +0000</pubDate>
		<guid isPermaLink="false">http://michaelsync.net/2008/04/07/silverlight-2-beta1-international-non-us-textbox#comment-89708</guid>
		<description>[...] Silverlight 2 (beta1): International (Non-US) TextBox (By Chris) [...]</description>
		<content:encoded><![CDATA[<p>[...] Silverlight 2 (beta1): International (Non-US) TextBox (By Chris) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christoph Husse</title>
		<link>http://michaelsync.net/2008/04/07/silverlight-2-beta1-international-non-us-textbox/comment-page-2#comment-87303</link>
		<dc:creator>Christoph Husse</dc:creator>
		<pubDate>Mon, 28 Jul 2008 19:51:54 +0000</pubDate>
		<guid isPermaLink="false">http://michaelsync.net/2008/04/07/silverlight-2-beta1-international-non-us-textbox#comment-87303</guid>
		<description>I am happy that it works now...

Well you changed a significiant part! Now you check whether the OS is NOT mac whereas you previously checked whether the OS is windows.

So I assume that your OS determination provided wrong results...

regards
chris</description>
		<content:encoded><![CDATA[<p>I am happy that it works now&#8230;</p>
<p>Well you changed a significiant part! Now you check whether the OS is NOT mac whereas you previously checked whether the OS is windows.</p>
<p>So I assume that your OS determination provided wrong results&#8230;</p>
<p>regards<br />
chris</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nuno Santos</title>
		<link>http://michaelsync.net/2008/04/07/silverlight-2-beta1-international-non-us-textbox/comment-page-2#comment-87299</link>
		<dc:creator>Nuno Santos</dc:creator>
		<pubDate>Mon, 28 Jul 2008 19:46:58 +0000</pubDate>
		<guid isPermaLink="false">http://michaelsync.net/2008/04/07/silverlight-2-beta1-international-non-us-textbox#comment-87299</guid>
		<description>Hi Chris,

I have done this:

public InternationalTextBox()
        {
            if (System.Environment.OSVersion.Platform != PlatformID.MacOSX)
            {
                KeyDown += new KeyEventHandler(ExtendedTextBox_KeyDown);
                KeyUp += new KeyEventHandler(ExtendedTextBox_KeyUp);
                TextChanged += new TextChangedEventHandler(ExtendedTextBox_TextChanged);
                SelectionChanged += new RoutedEventHandler(ExtendedTextBox_SelectionChanged);

                try
                {
                    IsolatedStorageFile File = IsolatedStorageFile.GetUserStoreForApplication();
                    IsolatedStorageFileStream Stream = File.OpenFile(&quot;InternationalTextBox.keyboard.layout&quot;, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);

                    using (Stream)
                    {
                        BinaryReader Reader = new BinaryReader(Stream);
                        String Selection = Reader.ReadString();

                        for (int i = 0; i &lt; TextBoxKeyboard.Keyboards.Length; i++)
                        {
                            if (TextBoxKeyboard.Keyboards[i].Description.CompareTo(Selection) == 0)
                            {
                                m_Keyboard = TextBoxKeyboard.Keyboards[i].CreateInstance();

                                break;
                            }
                        }
                    }
                }
                catch
                {
                    m_Keyboard = new US_Keyboard();
                }
            }
        }

Basicly its the same thing i tried the first time. It&#039;s working. maybe there was some gap in my testing.

I prefer this way because it will not implicate breaking changes in the rest of the code.

Thank you for your patient and help. 

Best regards,

Nuno</description>
		<content:encoded><![CDATA[<p>Hi Chris,</p>
<p>I have done this:</p>
<p>public InternationalTextBox()<br />
        {<br />
            if (System.Environment.OSVersion.Platform != PlatformID.MacOSX)<br />
            {<br />
                KeyDown += new KeyEventHandler(ExtendedTextBox_KeyDown);<br />
                KeyUp += new KeyEventHandler(ExtendedTextBox_KeyUp);<br />
                TextChanged += new TextChangedEventHandler(ExtendedTextBox_TextChanged);<br />
                SelectionChanged += new RoutedEventHandler(ExtendedTextBox_SelectionChanged);</p>
<p>                try<br />
                {<br />
                    IsolatedStorageFile File = IsolatedStorageFile.GetUserStoreForApplication();<br />
                    IsolatedStorageFileStream Stream = File.OpenFile(&#8220;InternationalTextBox.keyboard.layout&#8221;, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);</p>
<p>                    using (Stream)<br />
                    {<br />
                        BinaryReader Reader = new BinaryReader(Stream);<br />
                        String Selection = Reader.ReadString();</p>
<p>                        for (int i = 0; i &lt; TextBoxKeyboard.Keyboards.Length; i++)<br />
                        {<br />
                            if (TextBoxKeyboard.Keyboards[i].Description.CompareTo(Selection) == 0)<br />
                            {<br />
                                m_Keyboard = TextBoxKeyboard.Keyboards[i].CreateInstance();</p>
<p>                                break;<br />
                            }<br />
                        }<br />
                    }<br />
                }<br />
                catch<br />
                {<br />
                    m_Keyboard = new US_Keyboard();<br />
                }<br />
            }<br />
        }</p>
<p>Basicly its the same thing i tried the first time. It&#8217;s working. maybe there was some gap in my testing.</p>
<p>I prefer this way because it will not implicate breaking changes in the rest of the code.</p>
<p>Thank you for your patient and help. </p>
<p>Best regards,</p>
<p>Nuno</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christoph Husse</title>
		<link>http://michaelsync.net/2008/04/07/silverlight-2-beta1-international-non-us-textbox/comment-page-2#comment-86798</link>
		<dc:creator>Christoph Husse</dc:creator>
		<pubDate>Sun, 27 Jul 2008 06:01:31 +0000</pubDate>
		<guid isPermaLink="false">http://michaelsync.net/2008/04/07/silverlight-2-beta1-international-non-us-textbox#comment-86798</guid>
		<description>if(IsMac)
{
    emailTextBox = new TextBox();
}
else
{
    emailTextBox = new InternationalTextBox();
}

...

You can make initialization short by using constructors with more parameters like that:

emailTextBox = new InternationalTextBox(true, 150, 110, ...);

For XAML you could try to derive a component from &quot;UserControl&quot; and provide the above switch in the constructor, maintaining a &quot;private TextBox Surface;&quot; member which actuallly represents the content of your user control. Then just export all the member you need by prototyping them like:

Color BackgroundColor
{
    get{return Surface.BackgroundColor;}
    set[Surface.BackgroundColor = value;}
}</description>
		<content:encoded><![CDATA[<p>if(IsMac)<br />
{<br />
    emailTextBox = new TextBox();<br />
}<br />
else<br />
{<br />
    emailTextBox = new InternationalTextBox();<br />
}</p>
<p>&#8230;</p>
<p>You can make initialization short by using constructors with more parameters like that:</p>
<p>emailTextBox = new InternationalTextBox(true, 150, 110, &#8230;);</p>
<p>For XAML you could try to derive a component from &#8220;UserControl&#8221; and provide the above switch in the constructor, maintaining a &#8220;private TextBox Surface;&#8221; member which actuallly represents the content of your user control. Then just export all the member you need by prototyping them like:</p>
<p>Color BackgroundColor<br />
{<br />
    get{return Surface.BackgroundColor;}<br />
    set[Surface.BackgroundColor = value;}<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nuno Santos</title>
		<link>http://michaelsync.net/2008/04/07/silverlight-2-beta1-international-non-us-textbox/comment-page-2#comment-86693</link>
		<dc:creator>Nuno Santos</dc:creator>
		<pubDate>Sat, 26 Jul 2008 23:17:14 +0000</pubDate>
		<guid isPermaLink="false">http://michaelsync.net/2008/04/07/silverlight-2-beta1-international-non-us-textbox#comment-86693</guid>
		<description>Chris,

Sorry, but i don&#039;t know any other way of using your textbox without manually instanciate a variable of InternationTextBox type, initialize it with the constructor and manually add it to the UI like this:

            emailTextBox = new InternationalTextBox();
            emailTextBox.Keyboard = new Portuguese_Keyboard();
            emailTextBox.AcceptsReturn = true;
            emailTextBox.Width = 150;
            emailTextBox.Height = 110;
            emailTextBox.Margin = new Thickness(5, 5, 0, 5);
            emailTextBox.Padding = new Thickness(0, 0, 0, 0);
            emailTextBox.HorizontalAlignment = HorizontalAlignment.Left;
            emailTextBox.VerticalAlignment = VerticalAlignment.Bottom;
            emailTextBox.BorderThickness = new Thickness(0);
            emailTextBox.FontSize = 10;

LayoutRoot.Children.Add(emailTextBox);

I have already tried to instanciate it in xaml without any success. That would be wonderfull for me as i could have much less code.

I tried like this, but silverlight explodes and nothing appears:

xmlns:sda=&quot;clr-namespace:SDA.SL.UI&quot;

...



So, what i understood from your tip was to avoid everything in the InternationTextBox constructor while in mac.

Can you please be more specific? As i&#039;m not understanding you.

Thank you,

Best regards,

Nuno</description>
		<content:encoded><![CDATA[<p>Chris,</p>
<p>Sorry, but i don&#8217;t know any other way of using your textbox without manually instanciate a variable of InternationTextBox type, initialize it with the constructor and manually add it to the UI like this:</p>
<p>            emailTextBox = new InternationalTextBox();<br />
            emailTextBox.Keyboard = new Portuguese_Keyboard();<br />
            emailTextBox.AcceptsReturn = true;<br />
            emailTextBox.Width = 150;<br />
            emailTextBox.Height = 110;<br />
            emailTextBox.Margin = new Thickness(5, 5, 0, 5);<br />
            emailTextBox.Padding = new Thickness(0, 0, 0, 0);<br />
            emailTextBox.HorizontalAlignment = HorizontalAlignment.Left;<br />
            emailTextBox.VerticalAlignment = VerticalAlignment.Bottom;<br />
            emailTextBox.BorderThickness = new Thickness(0);<br />
            emailTextBox.FontSize = 10;</p>
<p>LayoutRoot.Children.Add(emailTextBox);</p>
<p>I have already tried to instanciate it in xaml without any success. That would be wonderfull for me as i could have much less code.</p>
<p>I tried like this, but silverlight explodes and nothing appears:</p>
<p>xmlns:sda=&#8221;clr-namespace:SDA.SL.UI&#8221;</p>
<p>&#8230;</p>
<p>So, what i understood from your tip was to avoid everything in the InternationTextBox constructor while in mac.</p>
<p>Can you please be more specific? As i&#8217;m not understanding you.</p>
<p>Thank you,</p>
<p>Best regards,</p>
<p>Nuno</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christoph Husse</title>
		<link>http://michaelsync.net/2008/04/07/silverlight-2-beta1-international-non-us-textbox/comment-page-2#comment-86607</link>
		<dc:creator>Christoph Husse</dc:creator>
		<pubDate>Sat, 26 Jul 2008 19:43:20 +0000</pubDate>
		<guid isPermaLink="false">http://michaelsync.net/2008/04/07/silverlight-2-beta1-international-non-us-textbox#comment-86607</guid>
		<description>&gt;In mac, the original textbox works with accents!

So I don&#039;t see the problem...

If you don&#039;t execute the constructor in mac, my textbox is simply a usual textbox, so it should work!</description>
		<content:encoded><![CDATA[<p>&gt;In mac, the original textbox works with accents!</p>
<p>So I don&#8217;t see the problem&#8230;</p>
<p>If you don&#8217;t execute the constructor in mac, my textbox is simply a usual textbox, so it should work!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nuno Santos</title>
		<link>http://michaelsync.net/2008/04/07/silverlight-2-beta1-international-non-us-textbox/comment-page-2#comment-86478</link>
		<dc:creator>Nuno Santos</dc:creator>
		<pubDate>Sat, 26 Jul 2008 08:55:24 +0000</pubDate>
		<guid isPermaLink="false">http://michaelsync.net/2008/04/07/silverlight-2-beta1-international-non-us-textbox#comment-86478</guid>
		<description>That way doesnt work in mac. Nothing.

This is what i have done in the constructor

if (Page.platform == Platform.Windows)
            {
                KeyDown += new KeyEventHandler(ExtendedTextBox_KeyDown);
                KeyUp += new KeyEventHandler(ExtendedTextBox_KeyUp);
                TextChanged += new TextChangedEventHandler(ExtendedTextBox_TextChanged);
                SelectionChanged += new RoutedEventHandler(ExtendedTextBox_SelectionChanged);

                try
                {
                    IsolatedStorageFile File = IsolatedStorageFile.GetUserStoreForApplication();
                    IsolatedStorageFileStream Stream = File.OpenFile(&quot;InternationalTextBox.keyboard.layout&quot;, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);

                    using (Stream)
                    {
                        BinaryReader Reader = new BinaryReader(Stream);
                        String Selection = Reader.ReadString();

                        for (int i = 0; i &lt; TextBoxKeyboard.Keyboards.Length; i++)
                        {
                            if (TextBoxKeyboard.Keyboards[i].Description.CompareTo(Selection) == 0)
                            {
                                m_Keyboard = TextBoxKeyboard.Keyboards[i].CreateInstance();

                                break;
                            }
                        }
                    }
                }
                catch
                {
                    m_Keyboard = new US_Keyboard();
                }
            }

Any thing missing?

Thx,

Nuno</description>
		<content:encoded><![CDATA[<p>That way doesnt work in mac. Nothing.</p>
<p>This is what i have done in the constructor</p>
<p>if (Page.platform == Platform.Windows)<br />
            {<br />
                KeyDown += new KeyEventHandler(ExtendedTextBox_KeyDown);<br />
                KeyUp += new KeyEventHandler(ExtendedTextBox_KeyUp);<br />
                TextChanged += new TextChangedEventHandler(ExtendedTextBox_TextChanged);<br />
                SelectionChanged += new RoutedEventHandler(ExtendedTextBox_SelectionChanged);</p>
<p>                try<br />
                {<br />
                    IsolatedStorageFile File = IsolatedStorageFile.GetUserStoreForApplication();<br />
                    IsolatedStorageFileStream Stream = File.OpenFile(&#8220;InternationalTextBox.keyboard.layout&#8221;, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);</p>
<p>                    using (Stream)<br />
                    {<br />
                        BinaryReader Reader = new BinaryReader(Stream);<br />
                        String Selection = Reader.ReadString();</p>
<p>                        for (int i = 0; i &lt; TextBoxKeyboard.Keyboards.Length; i++)<br />
                        {<br />
                            if (TextBoxKeyboard.Keyboards[i].Description.CompareTo(Selection) == 0)<br />
                            {<br />
                                m_Keyboard = TextBoxKeyboard.Keyboards[i].CreateInstance();</p>
<p>                                break;<br />
                            }<br />
                        }<br />
                    }<br />
                }<br />
                catch<br />
                {<br />
                    m_Keyboard = new US_Keyboard();<br />
                }<br />
            }</p>
<p>Any thing missing?</p>
<p>Thx,</p>
<p>Nuno</p>
]]></content:encoded>
	</item>
</channel>
</rss>
