none
二级磁贴 固定到“开始”屏幕 有去掉 确认框 的属性吗 RRS feed

  • 问题

  • 如图:

    可以去掉这个弹框吗,直接固定到屏幕。

    =============================================================创建二级磁贴

    	auto secondaryTile = ref new SecondaryTile(titleID,title,title,tileActivationArguments,Windows::UI::StartScreen::TileOptions::None,logo);
    	
    	auto const rect =GetElementRect(safe_cast<FrameworkElement^>(sender));//我没有发现去掉确认框的属性
    	create_task(secondaryTile->RequestCreateForSelectionAsync(rect, Windows::UI::Popups::Placement::Above)).then([this](bool isCreated)
        {
    		if (isCreated)
    		{
    			if (SecondaryTile::Exists(titleID))
    				{		
    					 tileContent2 = TileContentFactory::CreateTileSquarePeekImageAndText01();
    					
    
    					tileContent2->Image->Src = img;
    					tileContent2->TextBody1->Text =Title;	
    									TileUpdateManager::CreateTileUpdaterForApplication(titleID)->Update(tileContent2->CreateNotification());
    					TileUpdateManager::CreateTileUpdaterForApplication(titleID)->EnableNotificationQueue(true);							
    				}
    		}   
        });


    ======================================矩形弹框

    Rect GetElementRect(FrameworkElement^ element)
    {
        Windows::UI::Xaml::Media::GeneralTransform^ buttonTransform = element->TransformToVisual(nullptr);
        const Point pointOrig(0, 0);
        const Point pointTransformed = buttonTransform->TransformPoint(pointOrig);
        const Rect rect(pointTransformed.X,
                        pointTransformed.Y,
                        safe_cast<float>(element->ActualWidth),
                        safe_cast<float>(element->ActualHeight));

        return rect;
    }






    2012年12月21日 10:40

答案

全部回复