홈>
현재 주요 주제와 하위 주제/조회가있는 복잡한 비즈니스 응용 프로그램을 개발 중입니다.
내가 이루고 싶은 것은 모든 페이지에서 해당 응용 프로그램 내에서 성능이 뛰어난 탐색입니다.
햄버거 메뉴를 사용하는 것은 옵션이 아닙니다.
이제 사용자 정의 탭 페이지 탐색입니다.
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Company.Core.Views.MainView"
xmlns:views="clr-namespace:Company.Core.Views"
xmlns:viewModelBase="clr-namespace:Company.Core.ViewModels.Base"
xmlns:controls="clr-namespace:Company.Core.Controls"
BarBackgroundColor="{StaticResource DarkGreenColor}"
BackgroundColor="{StaticResource BackgroundColor}"
BarTextColor="{StaticResource WhiteColor}"
viewModelBase:ViewModelLocator.AutoWireViewModel="true">
<TabbedPage.Title>
<OnPlatform
x:TypeArguments="x:String"
iOS="App Name"
WinPhone="App Name"/>
</TabbedPage.Title>
<ContentPage.ToolbarItems>
<ToolbarItem
Command="{Binding SettingsCommand}"
Text="Settings">
<ToolbarItem.Icon>
<OnPlatform
x:TypeArguments="FileImageSource"
WinPhone="Assets\app_settings.png"
Android="app_settings"
iOS="app_settings"/>
</ToolbarItem.Icon>
</ToolbarItem>
</ContentPage.ToolbarItems>
<views:HomePageView
x:Name="HomeView">
<views:HomePageView.Icon>
<OnPlatform
x:TypeArguments="FileImageSource"
Android="menu_filter"
iOS="menu_filter"
WinPhone="Assets/test.png"/>
</views:HomePageView.Icon>
</views:HomePageView>
<views:EmployeesView
x:Name="EmployeesView">
<views:EmployeesView.Icon>
<OnPlatform
x:TypeArguments="FileImageSource"
Android="menu_filter"
iOS="menu_filter"
WinPhone="Assets/personalliste.png"/>
</views:EmployeesView.Icon>
</views:EmployeesView>
<views:MonthlySalaryView
x:Name="MonthlySalaryView">
<views:MonthlySalaryView.Icon>
<OnPlatform
x:TypeArguments="FileImageSource"
Android="bvg"
iOS="bvg"
WinPhone="Assets/bvg.png"/>
</views:MonthlySalaryView.Icon>
</views:MonthlySalaryView>
<views:CompanyDataView
x:Name="CompanyDataView">
<views:CompanyDataView.Icon>
<OnPlatform
x:TypeArguments="FileImageSource"
Android="DTA"
iOS="DTA"
WinPhone="Assets/DTA.png"/>
</views:CompanyDataView.Icon>
</views:CompanyDataView>
이것과 커스텀 렌더링은 다음과 같습니다 (UPP를 샘플로 사용) :
<UserControl
x:Name="Control"
x:Class="Company.Core.UWP.Controls.TabItem"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Company.Core.UWP.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
d:DesignHeight="300"
d:DesignWidth="600">
<UserControl.Resources>
<ResourceDictionary>
<Style x:Key="TabMainPanelStyle" TargetType="StackPanel">
<Setter Property="Height" Value="48" />
<Setter Property="Width" Value="150" />
</Style>
<Style x:Key="TabIconStyle" TargetType="Image">
<Setter Property="Height" Value="20" />
<Setter Property="Width" Value="20" />
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="Margin" Value="0, 4" />
</Style>
<Style x:Key="TabTextStyle" TargetType="TextBlock">
<Setter Property="Foreground" Value="White" />
<Setter Property="FontFamily" Value="Segoe UI" />
<Setter Property="FontSize" Value="12" />
<Setter Property="LineStackingStrategy" Value="BlockLineHeight" />
<Setter Property="LineHeight" Value="14" />
<Setter Property="MaxLines" Value="2" />
<Setter Property="TextAlignment" Value="Center" />
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="Margin" Value="2,5,2,7" />
</Style>
<Style x:Key="TabBadgeStyle" TargetType="Grid">
<Setter Property="Height" Value="16" />
<Setter Property="Width" Value="16" />
<Setter Property="CornerRadius" Value="24" />
<Setter Property="HorizontalAlignment" Value="Right" />
<Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="Margin" Value="6, 2, 0, 6" />
</Style>
<Style x:Key="BadgeTextStyle" TargetType="TextBlock">
<Setter Property="Foreground" Value="White" />
<Setter Property="FontSize" Value="10" />
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
</ResourceDictionary>
</UserControl.Resources>
<Grid>
<StackPanel
Style="{StaticResource TabMainPanelStyle}">
<!-- TAB ICON -->
<Image
Source="{Binding ElementName=Control, Path=Icon}"
Style="{StaticResource TabIconStyle}"/>
<!-- TAB TEXT -->
<TextBlock
Text="{Binding ElementName=Control, Path=Label}"
Style="{StaticResource TabTextStyle}" />
와이즈 비즈
PLACEHOLDER
그런 다음이 코드를 "PLACEHOLDER"에 넣었습니다
</StackPanel>
<!-- TAB BADGE -->
<Grid
Background="{Binding ElementName=Control, Path=BadgeColor}"
Style="{StaticResource TabBadgeStyle}">
<TextBlock
Text="{Binding ElementName=Control, Path=BadgeText}"
Style="{StaticResource BadgeTextStyle}"/>
</Grid>
</Grid>
이제 구현하려는 것은 탭을 클릭 할 때 드롭 다운이있는 메뉴입니다.
어떻게하면 되나요?
<ListView>
<ListView.ItemTemplate>
<DataTemplate>
<Grid>
<Border Background="LightGray" Height="200" Width="200">
<TextBlock Text="{Binding}"
FontSize="48" Foreground="Green"/>
</Border>
</Grid>
</DataTemplate>
</ListView.ItemTemplate>
<ListView.Items>
<x:String>One</x:String>
<ListViewItem>Two</ListViewItem>
</ListView.Items>
</ListView>
- 답변 # 1
관련 자료
- c# - FreshTabbedNavigationContainer 탭 페이지를 맨 위로 변경하고 xamarin 양식에서 iOS의 아이콘 및 글꼴 크기를 변경하는 방법
- xaml - xamarin 양식/크로스 플랫폼 - 탭 레이아웃은 화면의 일부에만 영향을 미칩니다
- ios - Xamarin Forms에서 이전 탭 페이지로 이동
- xamarin.forms - Xamarin Forms의 다른 페이지에서 셸 탭을 숨기는 방법?
- xamarin.forms - Xamarin Forms Android Lottie 애니메이션
- xamarin.forms - xamarin 양식 - 커스텀 컨트롤 런타임을 얻으십시오 (값 변환기로?)
- mvvm - xamarin 양식 - 컨트롤 템플릿의 bindingcontext 설정
- c# - Xamarin Forms는 DataTemplate의 부모 속성에 바인딩됩니다
- c# - 버튼 클릭으로 xamarin 양식 캡처 목록보기
- c# - Xamarin Forms 상세보기를 편집 가능하게 만들기
- xamarin.forms - xamarin 양식 - webview 컨텐츠 기본 크기가 너무 작습니다
- xamarin.forms - C # xamarin 양식을 사용하여 이전 페이지로 매개 변수를 전달하는 방법
- android - Xamarin Forms에서 앱에 대한 푸시 알림을 통해 수신 된 데이터를 저장하는 방법
- xamarin.forms - 자 마린 형태 - 피커를 선택한 경우 :숨겨진 레이블의 id를 c # 뒤에 코드로 보내기
- xamarin.forms - Xamarin은 가로 스크롤 레이아웃으로 빵 부스러기를 만듭니다
- xamarin 양식 - 이미지 위에 목록보기를 배치하는 방법?
- c# - xamarin은 코드 뒤에서 선택기를 채우는 방법을 형성합니다
- user interface - xamarin 양식 - 복잡한 listview 또는 collectionview 구현
- xaml - CollectionView에서 xamarin 양식 업데이트 항목
- xamarin.forms - xamarin 양식 - systemargumentnullexception이 발생했습니다 (ios)
관련 질문
- c# : 스타일이 code에서 적용되지 않는 이유는 무엇입니까?
- c# : xamarin 형식에서 한 행의 라디오 버튼을 클릭하면 ListView 항목의 인덱스 가져오기
- c# : WPF ListBoxItem 내부의 컨트롤을 클릭하면 ListBoxItem이 선택되지 않습니다.
- c# : XAML 페이지 간에 값(매개변수)을 전달하는 방법은 무엇입니까?
- c# : 팝업을 창에 고정하는 방법 /WPF에서 창으로 이동하는 방법
- c# : 토글 버튼 및 모든 버튼 템플릿
- c# : WPF XAML: 기본 스타일 설정을 위한 Label.Resources 대 Label.Style의 차이점 -또는 Label.Resources의 x:Key 없는 스타일이 기본값으로 사용되는 이유는 무엇입니까?
- c# : Xamarin 양식 ->공백을 표시하는 PopUpView, 제거하는 방법은 무엇입니까?
- c# : ListViewItem 클릭 이벤트를 내부에 있는 버튼 클릭 이벤트로 재정의
- c# : XAML 도구 키트 프로젝트 설정 문제를 위한 머티리얼 디자인
Xamarin.Forms에 사용 가능한 드롭 다운이 없지만 Xamarin.Forms에 사용되는 드롭 다운은 선택 도구입니다. 이를 사용하여 사용자가 선택할 수있는 옵션 목록을 표시 할 수 있습니다. 알려주지 않으면 귀하의 질문을 올바르게 이해했으면합니다.