The Media Center Sandbox

Resources and discussion for developing experiences in the Windows Media Center platform.
Welcome to The Media Center Sandbox Sign in | Join | Help
in Search

Focus back

Last post 07-15-2008, 8:08 AM by tronic. 3 replies.
Sort Posts: Previous Next
  •  07-03-2008, 8:33 AM 7842

    Focus back

    Hey.

    At First:

    I have an scrollable Repeater which is filled with values from an C# ArrayListDataSet, an Editbox and a Button.
    The Strings you write in the Editbox will fill in the Array when you click the Button (and then Displayed on the Scollabla Repeater).
    It scrolls automatic when the Sources changed (Invoke with NavigateIntoIndex).

    So far. The Scrollable Repeater gets the Focus. I will give back the Focus to the EditableText (EditBox), but the invoke NavigateInto does not work (I have test it also with an Timer).

    I have invoked it also at the Binding after the NavigateIntoIndex.

    <Binding Source="[App.Prop]" Target="[ListRepeater.Source]">
            <Actions>
              <Invoke Target="[ListRepeater.NavigateIntoIndex]" index="[xxx]"/>
              <Invoke Target="[EditBox.NavigateInto]" />
              </Actions>
          </Binding>

    Any Suggestions?

    thanks, tronic
  •  07-13-2008, 5:44 PM 7904 in reply to 7842

    Re: Focus back

    This sort of thing is very difficult, although normally a timer solution should work - perhaps you just need to increase the 'interval' of your timer?

    The other thing to look into is the different types of Invoke command - if you check the SDK, you'll find that there are different values for InvokePolicy ( http://msdn.microsoft.com/en-us/library/bb189231.aspx ).

    Try making the FIRST Invoke 'Synchronous', which means that it should try to actually run through the Focus event before it moves on to the next one. Make the last one low priority. But you will get varying results no matter what you do - the fact that Media Center doesn't buffer navigation events but allows them to override each-other is one of the most difficult things I've had to work around so far (there's a particular page in EMUCenter that STILL doesn't do it right!)

  •  07-15-2008, 5:34 AM 7916 in reply to 7904

    Re: Focus back

    Hey

    I tested it with an Timer Solution too, but it doesn't work.


    <Changed Source="[FocusTimer.Tick]">
            <Actions>
              <Invoke Target="[Input.NavigateInto]"/>
            </Actions>
          </Changed>


    Errormessage:

    Error building instance path 'Input.NavigateInto'. (Unable to locate a member called "NavigateInto" on 'Input' that is a Property, Indexer, Method, or Event. (Path provided was 'Input.NavigateInto').)   


    This Timer is in my EditBox.mcml.

    I thought it works with Input.NavigateInto, but I stand corrected.

    regards, tronic

  •  07-15-2008, 8:08 AM 7917 in reply to 7916

    Re: Focus back

    It works now :).

    damn, I am happy.

    The answer:

    I have put a <Panel Name="EditBox"> around my Editbox.....
    Only this way [EditBox.Navigateinto] will work with the Timer.
    This Way not: <me:EditBox Name="EditBox" .../>

    ...I am Happy :)

    Thank you ignoranceIsBliss
View as RSS news feed in XML
Powered by Community Server, by Telligent Systems