小编Ban*_*nng的帖子

Sharepoint 2013 - Taxonomy- Microsoft.SharePoint.Taxonomy.TaxonomySession.GetTaxonomySession"

我正在使用C#更新管理元数据字段.以下是获取TermId for term的代码.

        string termId = string.Empty;

        try
        {
            TaxonomySession tSession = TaxonomySession.GetTaxonomySession(CC);
            TermStore termStore = taxonomySession.GetDefaultSiteCollectionTermStore();
            TermSet tset = ts.GetTermSet(termSetId); // I have proper Guid here, checked this in SharePoint 2013 server.

            LabelMatchInformation lmi = new LabelMatchInformation(CC);

            lmi.Lcid = 1033;
            lmi.TrimUnavailable = true;
            lmi.TermLabel = "xyz"; //Name of the term.

            TermCollection termMatches = tset.GetTerms(lmi);

            CC.Load(tSession);
            CC.Load(ts);
            CC.Load(tset);
            CC.Load(termMatches);
            CC.ExecuteQuery();

            if (termMatches != null && termMatches.Count() > 0)
                termId = termMatches.First().Id.ToString();
        }
        catch (Exception ex)
        {
            var d = ex.Message; …
Run Code Online (Sandbox Code Playgroud)

taxonomy sharepoint-2013 csom

6
推荐指数
2
解决办法
5041
查看次数

在swift#3中获取捕获图像的EXIF元数据

我们得到的EXIF数据为空白。我们正在使用Swift3和iOS10.3,我们已引用URL- UIImagePickerController并从现有照片中提取EXIF数据

但是,它没有说明如何在Swift中进行操作。

下面的拍照是我们的代码。

拍照

@IBAction func takePhoto(_ sender: AnyObject) {
        if UIImagePickerController.isSourceTypeAvailable(UIImagePickerControllerSourceType.camera) {
            let imagePicker = UIImagePickerController()
            imagePicker.delegate = self
            imagePicker.sourceType = UIImagePickerControllerSourceType.camera
            imagePicker.allowsEditing = false
            self.present(imagePicker, animated: true, completion: nil)
        }
    }
Run Code Online (Sandbox Code Playgroud)

获取照片

func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : Any]) {
        if let pickedImage = info[UIImagePickerControllerOriginalImage] as? UIImage {
            myImg.contentMode = .scaleToFill
            myImg.image = pickedImage
        }
        picker.dismiss(animated: true, completion: nil)
    }
Run Code Online (Sandbox Code Playgroud)

保存照片

@IBAction func savePhoto(_ sender: AnyObject) {
        let imageData = UIImagePNGRepresentation(myImg.image!)
        let compresedImage = UIImage(data: …
Run Code Online (Sandbox Code Playgroud)

iphone exif swift3

5
推荐指数
1
解决办法
2272
查看次数

WPF - 网格中的扩展器 - 占用空间

我有非常简单的xaml.

<Grid Margin="0,50,0,0">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="30*" />
            <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <!--<RowDefinition Height="50"/>-->
        </Grid.RowDefinitions>
 <Expander Header=""
          HorizontalAlignment="Left"
          VerticalAlignment="Stretch"
          ExpandDirection="Right"
          IsExpanded="True"
          Grid.Column="0" 
          Grid.Row="0"
          Height="Auto"
           >
<!-- My List control -->
</Expander>
<TabControl Name="ExecutionTab" Grid.Column="1" Grid.Row="0" HorizontalAlignment="Stretch">
<!-- soem tabs here -->
</TabControl>
</Grid>
Run Code Online (Sandbox Code Playgroud)

在收集扩展器后,左侧部分[row = 0,col = 0]显示为空,带空格.我们想要的是正确的部分[row = 0,col = 1]应占用整个空间.

在这种情况下该怎么办?我尝试了Horizo​​ntalAlignment ="Stretch"到Tab控件但不能正常工作.

我是否需要添加事件处理程序,如崩溃和更改网格的宽度..但它似乎不是很好的方式?

有谁能提出更好的方法?

谢谢

c# wpf expander

4
推荐指数
1
解决办法
8508
查看次数

标签 统计

c# ×1

csom ×1

exif ×1

expander ×1

iphone ×1

sharepoint-2013 ×1

swift3 ×1

taxonomy ×1

wpf ×1