1

Windows Phone에서 이미지 갤러리처럼 부드럽게 스와핑을 할 수 없습니다. 님이 Windows Phone에서 사진 갤러리처럼 사진을 서로 바꿔보기 C#

나는 이미지를 교환하지만이 원활하게 교환하지 flip gesture listener 그 수를 시도했다.

검색을 시도했지만 답이 없습니다. 갤러리보기 방식으로 이미지 목록을 표시하려고합니다. 지난 3 일 동안 고생하고 있습니다. 당신이 제안이나 링크를 주시면 도움이 될 것입니다.

+1

질문이 명확하지 않습니다. 매끄러운 말을 할 때 애니메이션이 아니거나 애니메이션이 매우 낮은 프레임 속도로 실행 중입니까? –

+1

@ dr.mo 내가 명확하게 해줄거야. 나는 이미지 목록을 가지고 있는데, 이제는 Windows Phone에서 사진 갤러리 이미지보기처럼 보길 원합니다. 나는 애니메이션을하고 있지 않다. 나는 이미지를 왼쪽에서 오른쪽으로 움직이거나 그 반대 방향으로 움직이면 모든 이미지를 볼 수있다. 나는 그 일을 할 수 있지만 당신이 할 수없는 이미지를보기 위해 윈도우 폰 갤러리에서 찾은 애니메이션. 그것은 갤러리처럼 작동해야합니다. 제발 도와주세요. –

+0

@SanghatiMukherjee 다른 화면이나 그림 목록을 한 화면에 표시하고 싶습니까? 만약 당신이 내가 원하는 것을 내가 알면, 내가 할 수있는 일이 마음에 든다. 나는 코드를 주거나 어떻게 할 수 있는지 알려줄 것이다. – Apoorva

답변

1

이 내가 그냥 수행되어야하는 방법을 보여 내장 간단한 예입니다 .. u는 찾을 희망이 도움이

<phone:PhoneApplicationPage xmlns:Controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls" 
x:Class="PhotoChooser.MainPage" 
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone" 
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone" 
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768" 
FontFamily="{StaticResource PhoneFontFamilyNormal}" 
FontSize="{StaticResource PhoneFontSizeNormal}" 
Foreground="{StaticResource PhoneForegroundBrush}" 
SupportedOrientations="Portrait" Orientation="Portrait" 
shell:SystemTray.IsVisible="True"> 

<!--LayoutRoot is the root grid where all page content is placed--> 
<Grid x:Name="LayoutRoot" Background="Transparent"> 
    <Grid.RowDefinitions> 
     <RowDefinition Height="Auto"/> 
     <RowDefinition Height="*"/> 
    </Grid.RowDefinitions> 

    <!--TitlePanel contains the name of the application and page title--> 
    <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28"> 
     <TextBlock x:Name="ApplicationTitle" Text="MY APPLICATION" Style="{StaticResource PhoneTextNormalStyle}"/> 
     <TextBlock x:Name="PageTitle" Text="page name" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/> 
    </StackPanel> 

    <!--ContentPanel - place additional content here--> 
    <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0"> 
     <ListBox x:Name="lbImages"> 
      <ListBox.ItemTemplate> 
       <DataTemplate> 
        <Controls:Panorama> 
         <Controls:PanoramaItem> 
          <Image Source="{Binding ImageName}"/> 
         </Controls:PanoramaItem> 
        </Controls:Panorama> 
       </DataTemplate> 
      </ListBox.ItemTemplate> 
     </ListBox> 
    </Grid> 
</Grid> 

이 디자이너의 클래스 파일은 이런 식입니다

public partial class MainPage : PhoneApplicationPage 
{ 
    public MainPage() 
    { 
     InitializeComponent(); 

     PanoramaItem panItem = new PanoramaItem(); 
     List<ImageList> imgList = new List<ImageList>(); 


     imgList.Add(new ImageList() { ImageName = ImagePath.Image4 }); 
     lbImages.ItemsSource = imgList; 
    } 

    public class ImageList 
    { 
     public string ImageName { get; set; } 
    } 
} 

이것은 실제로 원활하게 작동하며 좋아 보인다. 시도하는 것을 성취 할 수있는 몇 가지 방법이 더 있습니다. 이 방법이 효과가 있는지 여부를 알려주세요. 다른 사람들에게 이것이 유익하지 않으면 제안 할 것입니다!

관련 문제