Hi,
I know how to set Focus.Delegate of TextInput on same UX file component. But how can I set Focus.Delegate on other UX file component like I want to set on messageView
of MessageChat
. How can I access other ux file component?
MainView.ux:
<App>
<Android.StatusBarConfig Color="Black" IsVisible="true" />
<DockPanel Margin="12,25,12,0" >
<BottomBarBackground Dock="Bottom" />
<TextInput ux:Name="TextBox" Margin="8" PlaceholderText="Enter Text Here" PlaceholderColor="#8f8f8fdd" FontSize="24" TextColor="Black" Dock="Bottom" Height="50" />
<MessageChat/>
</DockPanel>
</App>
MessageChat.ux:
<Panel ux:Class="MessageChat">
<JavaScript>
var Observable = require('FuseJS/Observable');
var messages = [ { items: "Hii" },
{ items: "Hello" },
{ items: "Good Mornign!" },
{ items: "How are you ?" },
{ items: "What do you do ?" } ];
module.exports = {
messages: messages
}
</JavaScript>
<ScrollView LayoutMode="PreserveScrollPosition" ux:Name="scrollView" AllowedScrollDirections="Vertical" Dock="Bottom" Height="90%" Width="100%" >
<StackPanel ux:Name="messageView" Alignment="Bottom" ItemSpacing="8">
<Each Items="{messages}" >
<Rectangle ux:Name="sendMessage" CornerRadius="25" Dock="Right" Color="#329af0" Padding="10" X="0" Y="0" >
<Text Value="{items}" TextWrapping="Wrap" Alignment="CenterRight" TextColor="White" FontSize="18" />
</Rectangle>
</Each>
</StackPanel>
</ScrollView>
</Panel>