![]() ![]() If the property is unset, the BackgroundColor property value is used. TabBarBackgroundColor, of type Color, that defines the background color for the tab bar.The Shell class defines the following attached properties that control the appearance of tabs: This implicit conversion automatically wraps the third ShellContent object in a Tab object. In addition, Shell's implicit conversion operators can be used to remove the second Tab object from the previous example: This code results in the layout shown in the following screenshot: When more than one ShellContent object is present in a Tab object, a top tab bar is added to the bottom tab, through which the ContentPage objects are navigable: This is accomplished by using the DataTemplate markup extension to set the ContentTemplate property of each ShellContent object to a ContentPage object. In a Shell app, pages are created on demand in response to navigation. This implicit conversion automatically wraps each ShellContent object in a Tab object. In addition, Shell's implicit conversion operators can be used to remove the ShellContent and Tab objects from the previous example: When there are more than five tabs on a TabBar, a More tab appears, which can be used to access the other tabs: The Icon property, of type ImageSource, defines the tab icon: The Title property, of type string, defines the tab title. If there are multiple Tab objects in a single TabBar object, Tab objects are rendered as bottom tabs: This implicit conversion automatically wraps the ShellContent object in a Tab object, which is wrapped in a TabBar object. These implicit-conversion operators can be used to remove the Tab objects from the previous example: This simplification is possible because a subclassed Shell object can only ever contain FlyoutItem objects or a TabBar object, which can only ever contain Tab objects, which can only ever contain ShellContent objects. Shell has implicit-conversion operators that enable the Shell visual hierarchy to be simplified without introducing more views into the visual tree. This example results in the following single page app: Within the Tab object, a ShellContent object should be set to a ContentPage object: Single pageĪ single page Shell app can be created by adding a Tab object to a TabBar object.
0 Comments
Leave a Reply. |